projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0838226
)
use sed instead of grep to get rid of the <?xml...> line
author
Michael Schroeder
<mls@suse.de>
Wed, 14 May 2014 13:50:11 +0000
(15:50 +0200)
committer
Michael 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
patch
|
blob
|
history
diff --git
a/tools/repo2solv.sh
b/tools/repo2solv.sh
index
4b595e8
..
215b1bc
100755
(executable)
--- a/
tools/repo2solv.sh
+++ b/
tools/repo2solv.sh
@@
-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=