Author: dmacvicar Date: Wed Apr 9 17:28:25 2008 New Revision: 9488 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9488&view=rev Log: - add support for parsing updateinfo.xml from repo2solv.sh so I dont need any convertors :-) Modified: trunk/sat-solver/tools/CMakeLists.txt trunk/sat-solver/tools/repo2solv.sh Modified: trunk/sat-solver/tools/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/CMakeLists.txt?rev=9488&r1=9487&r2=9488&view=diff ============================================================================== --- trunk/sat-solver/tools/CMakeLists.txt (original) +++ trunk/sat-solver/tools/CMakeLists.txt Wed Apr 9 17:28:25 2008 @@ -50,6 +50,7 @@ rpmmd2solv rpmdb2solv rpms2solv + updateinfoxml2solv DESTINATION ${BIN_INSTALL_DIR} ) install(PROGRAMS repo2solv.sh DESTINATION ${BIN_INSTALL_DIR} ) Modified: trunk/sat-solver/tools/repo2solv.sh URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo2solv.sh?rev=9488&r1=9487&r2=9488&view=diff ============================================================================== --- trunk/sat-solver/tools/repo2solv.sh (original) +++ trunk/sat-solver/tools/repo2solv.sh Wed Apr 9 17:28:25 2008 @@ -33,6 +33,25 @@ $cmd $i | rpmmd2solv $parser_options > $primfile || exit 4 fi + # This contains a updateinfo.xml* and maybe patches + if test -f updateinfo.xml || test -f updateinfo.xml.gz || test -f updateinfo.xml.bz2 ; then + for i in updateinfo.xml*; do + case $i in + *.gz) cmd="gzip -dc" ;; + *.bz2) cmd="bzip2 -dc" ;; + *) cmd="cat" ;; + esac + # only check the first updateinfo.xml*, in case there are more + break + done + updateinfofile="/nonexist" + if test -n "$cmd"; then + # we have some updateinfo.xml* + updateinfofile=`mktemp` || exit 3 + $cmd $i | updateinfoxml2solv $parser_options > $updateinfofile || exit 4 + fi + fi + patchfile="/nonexist" if test -f patches.xml; then patchfile=`mktemp` || exit 3 @@ -49,15 +68,19 @@ ) | grep -v '\?xml' | patchxml2solv $parser_options > $patchfile || exit 4 fi - # Now merge primary and patches - if test -s $primfile && test -s $patchfile; then + # 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 fi - rm -f $primfile $patchfile + rm -f $primfile $patchfile $updateinfofile elif test -d suse/setup/descr && test -s content; then olddir=`pwd` cd suse/setup/descr || exit 2 -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org