diff --git a/src/headerlist.c b/src/headerlist.c index 75702fa..e61b994 100644 --- a/src/headerlist.c +++ b/src/headerlist.c @@ -979,11 +979,6 @@ addToHeaderList(struct configTag *ct, provided->version=malloc(sizeof(char *)); provided->version[0]=strdup(provideversion[i]); } else if (provided->numproviders > 0) { - /* check if the package is already providing it... */ - for (j = 0; j < provided->numproviders; j++) { - if (!strcmp(provided->provider[j]->name,newheaderlist->name)) break; - } - /* if not add to the list of providers */ provided->numproviders++; newprovider=malloc(sizeof(struct headerList*)*provided->numproviders); for (j = 0; j < provided->numproviders-1; j++) { @@ -1008,9 +1003,8 @@ addToHeaderList(struct configTag *ct, free(provided->version); provided->version=newversion; } - } else { - fprintf(stderr,"%s has %d providers but is ignored\n",provided->name,provided->numproviders); + fprintf(stderr,"%s has %d providers but is ignored\n",provided->name,provided->numproviders); } } diff --git a/src/reports.c b/src/reports.c index 5417705..f3edd27 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1886,6 +1886,8 @@ print_datatables(struct configTag *ct, int arch) { while (provided) { nonobsoletednumproviders=0; for (i = 0; i < provided->numproviders; i++) { + // skip duplicated provides + if ((i > 0) && (provided->provider[i] == provided->provider[i-1])) continue; if (!provided->provider[i]->obsoleted) nonobsoletednumproviders++; } if (nonobsoletednumproviders > 1) {