diff options
-rw-r--r-- | VERSION.cmake | 2 | ||||
-rw-r--r-- | ext/repo_rpmmd.c | 18 | ||||
-rw-r--r-- | package/libsolv.changes | 7 | ||||
-rwxr-xr-x | tools/repo2solv.sh | 22 |
4 files changed, 42 insertions, 7 deletions
diff --git a/VERSION.cmake b/VERSION.cmake index 466c0d4..d496f5b 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0") SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "6") -SET(LIBSOLV_PATCH "18") +SET(LIBSOLV_PATCH "19") diff --git a/ext/repo_rpmmd.c b/ext/repo_rpmmd.c index 4272b6f..a45d491 100644 --- a/ext/repo_rpmmd.c +++ b/ext/repo_rpmmd.c @@ -776,10 +776,20 @@ startElement(void *userData, const char *name, const char **atts) str = find_attr("href", atts); if (str) { - repodata_set_location(pd->data, handle, 0, 0, str); - str = find_attr("xml:base", atts); - if (str) - repodata_set_poolstr(pd->data, handle, SOLVABLE_MEDIABASE, str); + int medianr = 0; + const char *base = find_attr("xml:base", atts); + if (base && !strncmp(base, "media:", 6)) + { + /* check for the media number in the fragment */ + int l = strlen(base); + while (l && base[l - 1] >= '0' && base[l - 1] <= '9') + l--; + if (l && base[l - 1] == '#' && base[l]) + medianr = atoi(base + l); + } + repodata_set_location(pd->data, handle, medianr, 0, str); + if (base) + repodata_set_poolstr(pd->data, handle, SOLVABLE_MEDIABASE, base); } break; case STATE_CHECKSUM: diff --git a/package/libsolv.changes b/package/libsolv.changes index 1754808..f431879 100644 --- a/package/libsolv.changes +++ b/package/libsolv.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Feb 15 16:46:31 CET 2016 - mls@suse.de + +- parse media number from baseurl +- support susedata.<lang>.xml language files +- bump version to 0.6.19 + +------------------------------------------------------------------- Fri Jan 29 14:17:26 CET 2016 - mls@suse.de - fix rule generation for linked packages [bnc#961738] diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh index 11c6567..49b623a 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 '</rpmmd>' ) | sed 's/<?xml[^>]*>//g' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | 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" |