Imported Upstream version 0.6.19 18/94118/1 upstream/0.6.19
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 27 Oct 2016 05:57:30 +0000 (14:57 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 27 Oct 2016 05:57:30 +0000 (14:57 +0900)
Change-Id: Ic898e621deb6d53ca1fd1db1c571753fb0df852e
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
ext/repo_rpmmd.c
package/libsolv.changes
tools/repo2solv.sh

index 466c0d4..d496f5b 100644 (file)
@@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0")
 
 SET(LIBSOLV_MAJOR "0")
 SET(LIBSOLV_MINOR "6")
-SET(LIBSOLV_PATCH "18")
+SET(LIBSOLV_PATCH "19")
 
index 4272b6f..a45d491 100644 (file)
@@ -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:
index 1754808..f431879 100644 (file)
@@ -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]
index 11c6567..49b623a 100755 (executable)
@@ -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"