diff --git a/src/distromatic.c b/src/distromatic.c index 5252a2c..a718051 100644 --- a/src/distromatic.c +++ b/src/distromatic.c @@ -473,20 +473,25 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx) addWarning(currheader->sourceheader,warning); } } else { /* provided->numproviders > 0 */ - for (j = 0; j < provided->numproviders; j++) { - if (provided->provider[j]->obsoleted && !currheader->obsoleted) { - snprintf(warning, PATH_MAX, "%s needed by %s(%s,%s) is provided by obsoleted package %s(%s,%s)", - provided->name, - currheader->name, - currheader->arch, - ct->repository[currheader->altrepository]->tag, - provided->provider[j]->name, - provided->provider[j]->arch, - ct->repository[provided->provider[j]->altrepository]->tag); - fprintf(stderr,"Warning: %s\n",warning); - addWarning(currheader->sourceheader,warning); - } - } + k=0; + for (j = 0; j < provided->numproviders; j++) { + if (provided->provider[j]->obsoleted && !currheader->obsoleted) k++; + } + if (k == provided->numproviders) { // all provides are obsoleted + snprintf(warning, PATH_MAX, "%s needed by %s(%s,%s) is only provided by obsoleted package(s):", + provided->name, + currheader->name, + currheader->arch, + ct->repository[currheader->altrepository]->tag); + for (j = 0; j < provided->numproviders; j++) { + snprintf(&warning[strlen(warning)], PATH_MAX - strlen(warning), " %s(%s,%s)", + provided->provider[j]->name, + provided->provider[j]->arch, + ct->repository[provided->provider[j]->altrepository]->tag); + } + fprintf(stderr,"Warning: %s\n",warning); + addWarning(currheader->sourceheader,warning); + } if ((currheader->require[i]->name)[0] == '/') { /* when there is a Requires: /file/requirement add provide from file tree as well */ file=findOrCreateFileTreeEntry(&ct->filetree[archidx],currheader->require[i]->name);