- echo '<patches>'
- for i in patch-*.xml*; do
- case $i in
- *.gz) gzip -dc "$i" ;;
- *.bz2) bzip2 -dc "$i" ;;
- *) cat "$i" ;;
- esac
- done
- echo '</patches>'
- ) | grep -v '\?xml' | patchxml2solv $parser_options > $patchfile || exit 4
- fi
-
- # Now merge primary and patches
- if 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
-elif test -d suse/setup/descr && test -s content; then
+ # fake tag to combine primary.xml and extensions
+ # like susedata.xml, other.xml, filelists.xml
+ echo '<rpmmd>'
+ if test -f $primxml ; then
+ repomd_decompress $primxml
+ # add a newline
+ echo
+ fi
+ susedataxml=`repomd_findfile susedata susedata.xml`
+ if test -f "$susedataxml" ; then
+ repomd_decompress "$susedataxml"
+ fi
+ echo '</rpmmd>'
+ ) | sed 's/<?xml[^>]*>//g' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4
+ fi
+
+ prodfile=
+ prodxml=`repomd_findfile products products.xml`
+ if test -z "$prodxml" ; then
+ prodxml=`repomd_findfile product product.xml`
+ fi
+ if test -n "$prodxml" -a -s "$prodxml" ; then
+ prodfile=`mktemp` || exit 3
+ repomd_decompress "$prodxml" | rpmmd2solv $parser_options > $prodfile || exit 4
+ fi
+
+ patternfile=
+ patternxml=`repomd_findfile 'patterns' patterns.xml`
+ if test -n "$patternxml" -a -s "$patternxml" ; then
+ patternfile=`mktemp` || exit 3
+ repomd_decompress "$patternxml" | rpmmd2solv $parser_options > $patternfile || exit 4
+ fi
+
+ # This contains repomd.xml
+ # for now we only read some keys like timestamp
+ repomdfile=
+ repomdxml=`repomd_findfile '' repomd.xml`
+ if test -n "$repomdxml" -a -s "$repomdxml" ; then
+ repomdfile=`mktemp` || exit 3
+ repomd_decompress "$repomdxml" | repomdxml2solv $parser_options > $repomdfile || exit 4
+ fi
+
+ # This contains suseinfo.xml, which is an extension to repomd.xml
+ # for now we only read some keys like expiration and products
+ suseinfofile=
+ suseinfoxml=`repomd_findfile suseinfo suseinfo.xml`
+ if test -n "$suseinfoxml" -a -s "$suseinfoxml" ; then
+ suseinfofile=`mktemp` || exit 3
+ repomd_decompress "$suseinfoxml" | repomdxml2solv $parser_options > $suseinfofile || exit 4
+ fi
+
+ # This contains a updateinfo.xml* and maybe patches
+ updateinfofile=
+ updateinfoxml=`repomd_findfile updateinfo updateinfo.xml`
+ if test -n "$updateinfoxml" -a -s "$updateinfoxml" ; then
+ updateinfofile=`mktemp` || exit 3
+ repomd_decompress "$updateinfoxml" | updateinfoxml2solv $parser_options > $updateinfofile || exit 4
+ fi
+
+ # This contains a deltainfo.xml*
+ deltainfofile=
+ deltainfoxml=`repomd_findfile deltainfo deltainfo.xml`
+ if test -z "$deltainfoxml"; then
+ deltainfoxml=`repomd_findfile prestodelta prestodelta.xml`
+ fi
+ if test -n "$deltainfoxml" -a -s "$deltainfoxml" ; then
+ deltainfofile=`mktemp` || exit 3
+ repomd_decompress "$deltainfoxml" | deltainfoxml2solv $parser_options > $deltainfofile || exit 4
+ fi
+
+ # This contains appdata
+ appdataxml=
+ appdatafile=
+ if test -x /usr/bin/appdata2solv ; then
+ appdataxml=`repomd_findfile appdata appdata.xml`
+ fi
+ if test -n "$appdataxml" -a -s "$appdataxml" ; then
+ appdatafile=`mktemp` || exit 3
+ repomd_decompress "$appdataxml" | appdata2solv $parser_options > $appdatafile || exit 4
+ fi
+
+ # Now merge primary, patches, updateinfo, and deltainfo
+ mergesolv $addautooption $repomdfile $suseinfofile $primfile $prodfile $patternfile $updateinfofile $deltainfofile $appdatafile
+ rm -f $repomdfile $suseinfofile $primfile $patternfile $prodfile $updateinfofile $deltainfofile $appdatafile
+
+elif test "$repotype" = susetags ; then