From: Michael Schroeder Date: Tue, 9 Feb 2016 10:57:23 +0000 (+0100) Subject: Support susedata..xml language files X-Git-Tag: 0.6.19~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc7a6b03f312e4d291b9de051d6be5c654dd4dda;p=thirdparty%2Flibsolv.git Support susedata..xml language files --- diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh index 11c6567b..49b623a8 100755 --- a/tools/repo2solv.sh +++ b/tools/repo2solv.sh @@ -28,7 +28,7 @@ repomd_findfile() { local p=$2 local f if test -n "$t" -a -s repomd.xml ; then - f=`repomdxml2solv -q $t:location < repomd.xml 2>/dev/null` + f=`repomdxml2solv -q "$t:location" < repomd.xml 2>/dev/null` f=${f##*/} if test -f "$f" ; then echo "$f" @@ -44,6 +44,10 @@ repomd_findfile() { fi } +repomd_types() { + test -s repomd.xml && repomdxml2solv -q type < repomd.xml +} + repomd_decompress() { case $1 in *.gz) gzip -dc "$1" ;; @@ -147,6 +151,17 @@ if test "$repotype" = rpmmd ; then if test -f "$susedataxml" ; then repomd_decompress "$susedataxml" fi + # all the languages as well + for t in `repomd_types` ; do + case "$t" in + susedata.*) + susedataxml=`repomd_findfile "$t" "$t.xml"` + if test -f "$susedataxml" ; then + repomd_decompress "$susedataxml" + fi + ;; + esac + done echo '' ) | sed 's/]*>//g' | sed '1i\' | rpmmd2solv $parser_options > $primfile || exit 4 fi @@ -244,6 +259,9 @@ elif test "$repotype" = susetags ; then # Now default language susetags_findfile_cat packages.en + # DL (delta rpms) + susetags_findfile_cat packages.DL + # Now patterns. Not simply those files matching *.pat{,.gz,bz2}, # but only those mentioned in the file 'patterns' if test -f patterns ; then @@ -263,7 +281,7 @@ elif test "$repotype" = susetags ; then esac case $name in # ignore files we handled already - *.DU | *.en | *.FL | packages ) continue ;; + *.DU | *.en | *.FL | *.DL | packages ) continue ;; *) suff=${name#packages.} echo "=Lan: $suff"