distromatic: fixes to obsoletes detection:
- ignore obsoletes from obsoleted packages - ignore obsoletes from updated or updating packages which apply to same {up/down}stream source build packages
This commit is contained in:
parent
6cf2f008b1
commit
e07f68435d
@ -347,33 +347,55 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
|
|||||||
prov=prov->next;
|
prov=prov->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* report obsoleted elements which are provided by other packages */
|
/* mark obsoleted elements which are provided by other packages */
|
||||||
currheader = ct->headerlist[archidx];
|
currheader = ct->headerlist[archidx];
|
||||||
while (currheader) {
|
while (currheader) {
|
||||||
|
if (currheader->obsoleted == 0)
|
||||||
for (j = 0; j < currheader->obsoletecount; j++) {
|
for (j = 0; j < currheader->obsoletecount; j++) {
|
||||||
prov=findOrCreateProvidedListEntry((struct providedList**) &ct->providedlist_idx[archidx],
|
prov=findOrCreateProvidedListEntry((struct providedList**) &ct->providedlist_idx[archidx],
|
||||||
currheader->obsoletename[j],0,archidx);
|
currheader->obsoletename[j],0,archidx);
|
||||||
if (prov) {
|
if (prov) {
|
||||||
for (i = 0; i < prov->numproviders; i++) {
|
for (i = 0; i < prov->numproviders; i++) {
|
||||||
if (strcmp(currheader->name,prov->provider[i]->name)) {
|
if (strcmp(currheader->name,prov->provider[i]->name)) {
|
||||||
prov->provider[i]->obsoleted = 1;
|
// if (currheader->sourceheader != prov->provider[i]->sourceheader) {
|
||||||
if (!strcmp(prov->name,prov->provider[i]->name)) {
|
if (prov->provider[i]->sourceheader == currheader->sourceheader) {
|
||||||
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)",
|
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s provided by %s(%s,%s) which comes from its own source; ignoring",
|
||||||
currheader->name,
|
currheader->name,
|
||||||
currheader->arch,
|
currheader->arch,
|
||||||
ct->repository[currheader->altrepository]->tag,
|
ct->repository[currheader->altrepository]->tag,
|
||||||
prov->provider[i]->name,
|
prov->name,
|
||||||
prov->provider[i]->arch,
|
prov->provider[i]->name,
|
||||||
ct->repository[prov->provider[i]->altrepository]->tag);
|
prov->provider[i]->arch,
|
||||||
|
ct->repository[prov->provider[i]->altrepository]->tag);
|
||||||
|
} else if (!strcmp(prov->provider[i]->sourceheader->name,currheader->sourceheader->name)) {
|
||||||
|
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s provided by %s(%s,%s) which comes from same source name; ignoring",
|
||||||
|
currheader->name,
|
||||||
|
currheader->arch,
|
||||||
|
ct->repository[currheader->altrepository]->tag,
|
||||||
|
prov->name,
|
||||||
|
prov->provider[i]->name,
|
||||||
|
prov->provider[i]->arch,
|
||||||
|
ct->repository[prov->provider[i]->altrepository]->tag);
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s provided by %s(%s,%s)",
|
prov->provider[i]->obsoleted = 1;
|
||||||
currheader->name,
|
if (!strcmp(prov->name,prov->provider[i]->name)) {
|
||||||
currheader->arch,
|
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s(%s,%s)",
|
||||||
ct->repository[currheader->altrepository]->tag,
|
currheader->name,
|
||||||
prov->name,
|
currheader->arch,
|
||||||
prov->provider[i]->name,
|
ct->repository[currheader->altrepository]->tag,
|
||||||
prov->provider[i]->arch,
|
prov->provider[i]->name,
|
||||||
ct->repository[prov->provider[i]->altrepository]->tag);
|
prov->provider[i]->arch,
|
||||||
|
ct->repository[prov->provider[i]->altrepository]->tag);
|
||||||
|
} else {
|
||||||
|
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s provided by %s(%s,%s)",
|
||||||
|
currheader->name,
|
||||||
|
currheader->arch,
|
||||||
|
ct->repository[currheader->altrepository]->tag,
|
||||||
|
prov->name,
|
||||||
|
prov->provider[i]->name,
|
||||||
|
prov->provider[i]->arch,
|
||||||
|
ct->repository[prov->provider[i]->altrepository]->tag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
addWarning(currheader->sourceheader, buf);
|
addWarning(currheader->sourceheader, buf);
|
||||||
logmsg(LOG_WARNING,"%s", buf);
|
logmsg(LOG_WARNING,"%s", buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user