case STATE_LOCATION:
str = find_attr("href", atts);
if (str)
- {
- const char *str2 = strrchr(str, '/');
- if (str2)
- {
- char *str3 = strdup(str);
- str3[str2 - str] = 0;
- repodata_set_poolstr(pd->data, handle, SOLVABLE_MEDIADIR, str3);
- free(str3);
- repodata_set_str(pd->data, handle, SOLVABLE_MEDIAFILE, str2 + 1);
- }
- else
- repodata_set_str(pd->data, handle, SOLVABLE_MEDIAFILE, str);
- }
+ repodata_set_location(pd->data, handle, 0, 0, str);
break;
case STATE_CHECKSUM:
pd->tmpattr = find_attr("type", atts);
int i, l;
struct stateswitch *sw;
Repodata *data;
+ unsigned int now;
+ now = sat_timems(0);
if (!(flags & REPO_REUSE_REPODATA))
data = repo_add_repodata(repo, 0);
else
sat_free(pd.cscache);
if (!(flags & REPO_NO_INTERNALIZE))
repodata_internalize(data);
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_rpmmd took %d ms\n", sat_timems(now));
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %ld K incore, %ld K idarray\n", (unsigned long)data->incoredatalen/1024, (unsigned long)repo->idarraysize / (1024/sizeof(Id)));
}