repo_rpmmd: Parse optional baseurl.
authorZdenek Pavlas <zpavlas@redhat.com>
Wed, 29 May 2013 13:49:00 +0000 (15:49 +0200)
committerZdenek Pavlas <zpavlas@redhat.com>
Wed, 29 May 2013 13:50:00 +0000 (15:50 +0200)
ext/repo_rpmmd.c
src/knownid.h

index b545df5..1a92ad7 100644 (file)
@@ -765,7 +765,12 @@ startElement(void *userData, const char *name, const char **atts)
     case STATE_LOCATION:
       str = find_attr("href", atts);
       if (str)
-       repodata_set_location(pd->data, handle, 0, 0, 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);
+       }
       break;
     case STATE_CHECKSUM:
       str = find_attr("type", atts);
index 83b943e..0b3568f 100644 (file)
@@ -247,6 +247,7 @@ KNOWNID(PUBKEY_KEYID,                       "pubkey:keyid"),
 KNOWNID(PUBKEY_FINGERPRINT,            "pubkey:fingerprint"),
 KNOWNID(PUBKEY_EXPIRES,                        "pubkey:expires"),
 KNOWNID(PUBKEY_SIGNATURES,             "pubkey:signatures"),
+KNOWNID(SOLVABLE_MEDIABASE,            "solvable:mediabase"), /* <location xml:base=... > */
 
 KNOWNID(ID_NUM_INTERNAL,               0)