reports: don't count as required packages which have alternative provides

This commit is contained in:
Silvan Calarco 2024-12-06 11:00:51 +01:00
parent 80d617dc87
commit 1c8615089f

View File

@ -1820,9 +1820,10 @@ int print_datatables(struct configTag *ct, int arch) {
fprintf(fd," "); fprintf(fd," ");
} }
} }
for (int j = 0; j < currheaderlist->require[i]->resolved->numproviders; j++) { // Update count for required packages if single provider
if (currheaderlist->require[i]->resolved->provider[j]->sourceheader != currheaderlist->sourceheader) if (currheaderlist->require[i]->resolved->numproviders == 1) {
currheaderlist->require[i]->resolved->provider[j]->sourceheader->childrenrequiredcount[arch]++; if (currheaderlist->require[i]->resolved->provider[0]->sourceheader != currheaderlist->sourceheader)
currheaderlist->require[i]->resolved->provider[0]->sourceheader->childrenrequiredcount[arch]++;
} }
} }
} }
@ -1857,9 +1858,10 @@ int print_datatables(struct configTag *ct, int arch) {
fprintf(fd," "); fprintf(fd," ");
} }
} }
for (int j = 0; j < currheaderlist->recommend[i]->resolved->numproviders; j++) { // Update count for recommended packages if single provider
if (currheaderlist->recommend[i]->resolved->provider[j]->sourceheader != currheaderlist->sourceheader) if (currheaderlist->recommend[i]->resolved->numproviders == 1) {
currheaderlist->recommend[i]->resolved->provider[j]->sourceheader->childrenrequiredcount[arch]++; if (currheaderlist->recommend[i]->resolved->provider[0]->sourceheader != currheaderlist->sourceheader)
currheaderlist->recommend[i]->resolved->provider[0]->sourceheader->childrenrequiredcount[arch]++;
} }
} }
} }
@ -1875,9 +1877,10 @@ int print_datatables(struct configTag *ct, int arch) {
fprintf(fbd," "); fprintf(fbd," ");
fprintf_depstable_filtered_var(fbd,currheaderlist->sourceheader->require[i]->name); fprintf_depstable_filtered_var(fbd,currheaderlist->sourceheader->require[i]->name);
if (currheaderlist->sourceheader->require[i]->resolved) { if (currheaderlist->sourceheader->require[i]->resolved) {
for (int j = 0; j < currheaderlist->sourceheader->require[i]->resolved->numproviders; j++) { // Update count for required source packages if single provider
if (currheaderlist->sourceheader->require[i]->resolved->provider[j]->sourceheader != currheaderlist->sourceheader) if (currheaderlist->sourceheader->require[i]->resolved->numproviders == 1) {
currheaderlist->sourceheader->require[i]->resolved->provider[j]->sourceheader->childrenrequiredcount[arch]++; if (currheaderlist->sourceheader->require[i]->resolved->provider[0]->sourceheader != currheaderlist->sourceheader)
currheaderlist->sourceheader->require[i]->resolved->provider[0]->sourceheader->childrenrequiredcount[arch]++;
} }
} }
} }