summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:57:30 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-27 14:57:30 +0900
commit2b7fc13cedc8bb796ac2b7e88f664d1602cf701f (patch)
treebb5cb268038bae4dbe7ff40d52be058977e0572c /ext
parent26ea6e32000a3e6ea392ccc6f8c9d2f51aabd2e4 (diff)
downloadlibsolv-2b7fc13cedc8bb796ac2b7e88f664d1602cf701f.tar.gz
libsolv-2b7fc13cedc8bb796ac2b7e88f664d1602cf701f.tar.bz2
libsolv-2b7fc13cedc8bb796ac2b7e88f664d1602cf701f.zip
Imported Upstream version 0.6.19upstream/0.6.19
Change-Id: Ic898e621deb6d53ca1fd1db1c571753fb0df852e Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'ext')
-rw-r--r--ext/repo_rpmmd.c18
1 files changed, 14 insertions, 4 deletions
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: