/* Cumulated info about the current deltarpm or patchrpm */
struct deltarpm {
char *location;
+ char *locbase;
unsigned int buildtime;
unsigned long long downloadsize;
char *filechecksum;
else if (!strcmp(*atts, "oldrelease"))
r = atts[1];
}
- if (e && !strcmp(e, "0"))
+ if (e && (!*e || !strcmp(e, "0")))
e = 0;
if (v && !e)
{
pd->delta.bevr[pd->delta.nbevr++] = makeevr_atts(pool, pd, atts);
break;
case STATE_FILENAME:
+ if ((str = find_attr("xml:base", atts)))
+ pd->delta.locbase = solv_strdup(str);
break;
case STATE_LOCATION:
pd->delta.location = solv_strdup(find_attr("href", atts));
+ if ((str = find_attr("xml:base", atts)))
+ pd->delta.locbase = solv_strdup(str);
break;
case STATE_SIZE:
break;
repodata_set_id(pd->data, handle, DELTA_PACKAGE_EVR, pd->newpkgevr);
repodata_set_id(pd->data, handle, DELTA_PACKAGE_ARCH, pd->newpkgarch);
if (d->location)
- repodata_set_deltalocation(pd->data, handle, 0, 0, d->location);
+ {
+ repodata_set_deltalocation(pd->data, handle, 0, 0, d->location);
+ if (d->locbase)
+ repodata_set_poolstr(pd->data, handle, DELTA_LOCATION_BASE, d->locbase);
+ }
if (d->downloadsize)
repodata_set_num(pd->data, handle, DELTA_DOWNLOADSIZE, d->downloadsize);
if (d->filechecksum)
pd->delta.nbevr = 0;
pd->delta.seqnum = solv_free(pd->delta.seqnum);
pd->delta.location = solv_free(pd->delta.location);
+ pd->delta.locbase = solv_free(pd->delta.locbase);
break;
case STATE_FILENAME:
pd->delta.location = solv_strdup(pd->content);