diff --git a/src/distromatic.c b/src/distromatic.c index f33bead..b871be7 100644 --- a/src/distromatic.c +++ b/src/distromatic.c @@ -255,10 +255,11 @@ handleObsoletedPackages(struct configTag *ct, int archidx) prov->provider[i]->obsoleteflags[j], buf)) continue; } - if (prov->provider[k]->altrepository == ct->repository_level) { + /* print 'obsoletes' warning for binary packages belonging to target repository, + and 'obsoleted by' for all obsoletions in upper level repositories */ + if (prov->provider[k]->altrepository != ct->repository_level) { currheader = prov->provider[k]->sourceheader->firstchild[archidx]; while (currheader) { - /* print 'obsoleted by' warning only for binary packages belonging to target repository */ if (!strcmp(currheader->name, prov->provider[k]->name)) { snprintf(buf, PATH_MAX, "%s(%s,%s) obsoleted by %s(%s,%s)", prov->provider[k]->name, @@ -273,8 +274,7 @@ handleObsoletedPackages(struct configTag *ct, int archidx) } currheader = currheader -> nextbrother; } - } - if (prov->provider[i]->altrepository == ct->repository_level) { + } else { snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)", prov->provider[i]->name, prov->provider[i]->arch,