use sed instead of grep to get rid of the <?xml...> line
authorMichael Schroeder <mls@suse.de>
Wed, 14 May 2014 13:50:11 +0000 (15:50 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 14 May 2014 13:50:11 +0000 (15:50 +0200)
This allows us to parse files with no newlines.

tools/repo2solv.sh

index 4b595e8..215b1bc 100755 (executable)
@@ -148,7 +148,7 @@ if test "$repotype" = rpmmd ; then
        repomd_decompress "$susedataxml"
      fi
      echo '</rpmmd>'
-    ) | grep -v '<?xml' |  sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4
+    ) | sed 's/<?xml[^>]*>//' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4
   fi
 
   prodfile=