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,15 +347,36 @@ 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)) {
|
||||||
|
// if (currheader->sourceheader != prov->provider[i]->sourceheader) {
|
||||||
|
if (prov->provider[i]->sourceheader == currheader->sourceheader) {
|
||||||
|
snprintf(buf, PATH_MAX, "%s(%s,%s) obsoletes %s provided by %s(%s,%s) which comes from its own source; 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 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 {
|
||||||
prov->provider[i]->obsoleted = 1;
|
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)",
|
||||||
@ -375,6 +396,7 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
|
|||||||
prov->provider[i]->arch,
|
prov->provider[i]->arch,
|
||||||
ct->repository[prov->provider[i]->altrepository]->tag);
|
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