Complete previous fix by setting packages as obsoleted in other parts

This commit is contained in:
Silvan Calarco 2012-05-29 19:59:03 +02:00
parent 372e91d705
commit 2c5d8f223c

View File

@ -258,9 +258,10 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
/* print 'obsoletes' warning for binary packages belonging to target repository, /* print 'obsoletes' warning for binary packages belonging to target repository,
and 'obsoleted by' for all obsoletions in upper level repositories */ and 'obsoleted by' for all obsoletions in upper level repositories */
if (prov->provider[k]->altrepository != ct->repository_level) { if (prov->provider[k]->altrepository != ct->repository_level) {
currheader = prov->provider[k]->sourceheader->firstchild[archidx]; currheader = prov->provider[k]->sourceheader->firstchild[archidx];
while (currheader) { while (currheader) {
if (!strcmp(currheader->name, prov->provider[k]->name)) { if (!strcmp(currheader->name, prov->provider[k]->name)) {
prov->provider[k]->obsoleted = 1;
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoleted by %s(%s,%s)", snprintf(buf, PATH_MAX, "%s(%s,%s) obsoleted by %s(%s,%s)",
prov->provider[k]->name, prov->provider[k]->name,
prov->provider[k]->arch, prov->provider[k]->arch,
@ -272,10 +273,10 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
logmsg(LOG_WARNING,"%s", buf); logmsg(LOG_WARNING,"%s", buf);
break; break;
} }
currheader -> obsoleted = 1;
currheader = currheader -> nextbrother; currheader = currheader -> nextbrother;
} }
} else { } else {
prov->provider[k]->obsoleted = 1;
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)", snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)",
prov->provider[i]->name, prov->provider[i]->name,
prov->provider[i]->arch, prov->provider[i]->arch,
@ -324,6 +325,7 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
if (prov) { if (prov) {
for (i = 0; i < prov->numproviders; i++) { for (i = 0; i < prov->numproviders; i++) {
if (prov->provider[i] != currheader) { if (prov->provider[i] != currheader) {
prov->provider[i]->obsoleted = 1;
if (!strcmp(prov->name,prov->provider[i]->name)) { if (!strcmp(prov->name,prov->provider[i]->name)) {
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)", snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)",
currheader->name, currheader->name,
@ -472,7 +474,7 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
} }
} else { /* provided->numproviders > 0 */ } else { /* provided->numproviders > 0 */
for (j = 0; j < provided->numproviders; j++) { for (j = 0; j < provided->numproviders; j++) {
if (provided->provider[j] && provided->provider[j]->obsoleted) { if (provided->provider[j]->obsoleted && !currheader->obsoleted) {
snprintf(warning, PATH_MAX, "%s needed by %s(%s,%s) is provided by obsoleted package %s(%s,%s)", snprintf(warning, PATH_MAX, "%s needed by %s(%s,%s) is provided by obsoleted package %s(%s,%s)",
provided->name, provided->name,
currheader->name, currheader->name,