Provide smarter warnings for obsoleted and obsoleting packages
This commit is contained in:
parent
30c3b97217
commit
1e56f5eb13
@ -260,25 +260,28 @@ handleObsoletedPackages(struct configTag *ct, int 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, "obsoleted by %s(%s) from package %s(source) in %s",
|
||||
snprintf(buf, PATH_MAX, "%s(%s) obsoleted by %s(%s) in %s",
|
||||
prov->provider[k]->name,
|
||||
prov->provider[k]->arch,
|
||||
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);
|
||||
logmsg(LOG_WARNING,"%s", buf);
|
||||
break;
|
||||
}
|
||||
currheader = currheader -> nextbrother;
|
||||
}
|
||||
}
|
||||
if (prov->provider[i]->sourceheader->altrepository == ct->repository_level) {
|
||||
snprintf(buf, PATH_MAX, "obsoletes %s from package %s(source) in %s",
|
||||
snprintf(buf, PATH_MAX, "%s(%s) obsoletes %s(%s) in %s",
|
||||
prov->provider[i]->name,
|
||||
prov->provider[i]->arch,
|
||||
prov->provider[k]->name,
|
||||
prov->provider[k]->sourceheader->name,
|
||||
prov->provider[k]->arch,
|
||||
ct->repository[prov->provider[k]->sourceheader->altrepository]->tag);
|
||||
addWarning(prov->provider[i]->sourceheader, buf);
|
||||
logmsg(LOG_WARNING,"%s(%s): %s",prov->provider[i]->name, prov->provider[i]->arch, buf);
|
||||
logmsg(LOG_WARNING,"%s", buf);
|
||||
}
|
||||
obs[k]=i;
|
||||
}
|
||||
@ -318,13 +321,24 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
|
||||
if (prov) {
|
||||
for (i = 0; i < prov->numproviders; i++) {
|
||||
if (prov->provider[i] != currheader) {
|
||||
snprintf(buf, PATH_MAX, "obsoletes %s provided by package %s(%s) in %s",
|
||||
if (!strcmp(prov->name,prov->provider[i]->name)) {
|
||||
snprintf(buf, PATH_MAX, "%s(%s) obsoletes %s(%s) in %s",
|
||||
currheader->name,
|
||||
currheader->arch,
|
||||
prov->provider[i]->name,
|
||||
prov->provider[i]->arch,
|
||||
ct->repository[prov->provider[i]->sourceheader->altrepository]->tag);
|
||||
} else {
|
||||
snprintf(buf, PATH_MAX, "%s(%s) obsoletes %s provided by %s(%s) in %s",
|
||||
currheader->name,
|
||||
currheader->arch,
|
||||
prov->name,
|
||||
prov->provider[i]->name,
|
||||
prov->provider[i]->arch,
|
||||
ct->repository[prov->provider[i]->sourceheader->altrepository]->tag);
|
||||
addWarning(prov->provider[i]->sourceheader, buf);
|
||||
logmsg(LOG_WARNING,"%s(%s): %s",currheader->name, currheader->arch, buf);
|
||||
}
|
||||
addWarning(currheader->sourceheader, buf);
|
||||
logmsg(LOG_WARNING,"%s", buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user