]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Get (optionally compressed) product.xml from repomd
authorMichael Andres <ma@suse.de>
Mon, 23 Nov 2009 15:14:33 +0000 (16:14 +0100)
committerMichael Andres <ma@suse.de>
Mon, 23 Nov 2009 15:14:33 +0000 (16:14 +0100)
tools/repo2solv.sh

index 65bfdced06842863ab23e5324bf064501c301b05..512a6aae5c2e6957a25b2092708dda38aab08d77 100755 (executable)
@@ -116,13 +116,15 @@ if test "$repotype" = rpmmd ; then
   fi
 
   prodfile=
-  if test -f product.xml; then
+  prodxml=`repomd_findfile product product.xml`
+  if test -z "$prodxml" ; then
+    prodxml=`repomd_findfile products products.xml`
+  fi
+  if test -n "$prodxml" -a -s "$prodxml" ; then
     prodfile=`mktemp` || exit 3
     (
      echo '<products>'
-     for i in product*.xml*; do
-       repomd_decompress $i
-     done
+     repomd_decompress "$prodxml"
      echo '</products>'
     ) | grep -v '\?xml' | rpmmd2solv $parser_options > $prodfile || exit 4
   fi