From: Klaus Kaempf Date: Tue, 8 Apr 2008 14:45:28 +0000 (+0000) Subject: write UPDATE_COLLECTION X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~429 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=44c4bcad535873d0d5f6cfc3e24c71947d018eb4;p=thirdparty%2Flibsolv.git write UPDATE_COLLECTION --- diff --git a/tools/repo_updateinfoxml.c b/tools/repo_updateinfoxml.c index e1b7d23b..8190d174 100644 --- a/tools/repo_updateinfoxml.c +++ b/tools/repo_updateinfoxml.c @@ -347,13 +347,28 @@ startElement(void *userData, const char *name, const char **atts) } /* generated Ids for name and arch */ n = str2id(pool, name, 1); - a = str2id(pool, arch, 1); + if (arch) + a = str2id(pool, arch, 1); + else + a = ARCH_NOARCH; /* now combine both to a single Id */ na = rel2id(pool, n, a, REL_ARCH, 1); rel_id = rel2id(pool, na, evr, REL_LT, 1); solvable->conflicts = repo_addid_dep(pd->repo, solvable->conflicts, rel_id, 0); + + if (1) { + const char *evrstr = id2str(pool, evr); + int buflen = strlen(name) + 1 + strlen(evrstr) + 1 + strlen(arch?arch:"") + 1; + char *buf; + if (!arch) arch = ""; + buf = (char *)malloc(buflen); + if (!buf) exit(1); + sprintf(buf, "%s %s %s", name, evrstr, arch); + repodata_add_poolstr_array(pd->data, pd->datanum, UPDATE_COLLECTION, buf); + free(buf); + } } break; /* libntlm-0.4.2-1.fc8.x86_64.rpm */