From: Jan Kupec Date: Tue, 13 May 2008 11:15:24 +0000 (+0000) Subject: - include deltainfo.xml X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~345 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66d477f004c3ad563c512635ae798d4fe77ccdbb;p=thirdparty%2Flibsolv.git - include deltainfo.xml --- diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh index 93c28a82..96873c8c 100755 --- a/tools/repo2solv.sh +++ b/tools/repo2solv.sh @@ -68,19 +68,41 @@ if test -d repodata; then ) | grep -v '\?xml' | patchxml2solv $parser_options > $patchfile || exit 4 fi - # Now merge primary and patches and updateinfo - if test -s $primfile && test -s $patchfile && test -s $updateinfofile; then - mergesolv $primfile $patchfile $updateinfofile - elif test -s $primfile && test -s $updateinfofile; then - mergesolv $primfile $updateinfofile - elif test -s $primfile && test -s $patchfile; then - mergesolv $primfile $patchfile - elif test -s $primfile; then - cat $primfile - elif test -s $patchfile; then - cat $patchfile + # This contains a deltainfo.xml* + if test -f deltainfo.xml || test -f deltainfo.xml.gz || test -f deltainfo.xml.bz2 ; then + for i in deltainfo.xml*; do + case $i in + *.gz) cmd="gzip -dc" ;; + *.bz2) cmd="bzip2 -dc" ;; + *) cmd="cat" ;; + esac + # only check the first deltainfo.xml*, in case there are more + break + done + deltainfofile="/nonexist" + if test -n "$cmd"; then + # we have some deltainfo.xml* + deltainfofile=`mktemp` || exit 3 + $cmd $i | deltainfoxml2solv $parser_options > $deltainfofile || exit 4 + fi + fi + + # Now merge primary, patches, updateinfo, and deltainfo + if test -s $primfile; then + m_primfile=$primfile + fi + if test -s $patchfile; then + m_patchfile=$patchfile fi - rm -f $primfile $patchfile $updateinfofile + if test -s $updateinfofile; then + m_updateinfofile=$updateinfofile + fi + if test -s $deltainfofile; then + m_deltainfofile=$deltainfofile + fi + mergesolv $m_primfile $m_patchfile $m_updateinfofile $m_deltainfofile + rm -f $primfile $patchfile $updateinfofile $deltainfofile + elif test -d suse/setup/descr && test -s content; then olddir=`pwd` cd suse/setup/descr || exit 2