Added a check to display 'obsoleted by' warning only for binary packages belonging to target repository

This commit is contained in:
Silvan Calarco 2011-08-12 17:53:10 +02:00
parent 01c345c579
commit c5fe806773

View File

@ -234,6 +234,7 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
int i,j,k;
int obs[256];
char buf[PATH_MAX];
struct headerList* currchild;
while (prov) {
@ -255,13 +256,21 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
buf)) continue;
}
if (prov->provider[k]->sourceheader->altrepository == ct->repository_level) {
snprintf(buf, PATH_MAX, "obsoleted by %s(%s) from package %s(source) in %s",
prov->provider[i]->name,
prov->provider[i]->arch,
prov->provider[i]->sourceheader->name,
ct->repository[prov->provider[i]->sourceheader->altrepository]->tag);
addWarning(prov->provider[k]->sourceheader, buf);
logmsg(LOG_WARNING,"%s(%s): %s",prov->provider[k]->name, prov->provider[k]->arch, buf);
currchild = prov->provider[k]->sourceheader->firstchild[archidx];
while (currchild) {
/* print 'obsoleted by' warning only for binary packages belonging to target repository */
if (!strcmp(currchild->name, prov->provider[k]->name)) {
snprintf(buf, PATH_MAX, "obsoleted by %s(%s) from package %s(source) in %s",
prov->provider[i]->name,
prov->provider[i]->arch,
prov->provider[i]->sourceheader->name,
ct->repository[prov->provider[i]->sourceheader->altrepository]->tag);
addWarning(prov->provider[k]->sourceheader, buf);
logmsg(LOG_WARNING,"%s(%s): %s",prov->provider[k]->name, prov->provider[k]->arch, buf);
break;
}
currchild = currchild -> nextbrother;
}
}
if (prov->provider[i]->sourceheader->altrepository == ct->repository_level) {
snprintf(buf, PATH_MAX, "obsoletes %s from package %s(source) in %s",