diff --git a/src/reports.c b/src/reports.c index 41c2cc8..938628f 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1820,9 +1820,10 @@ int print_datatables(struct configTag *ct, int arch) { fprintf(fd," "); } } - for (int j = 0; j < currheaderlist->require[i]->resolved->numproviders; j++) { - if (currheaderlist->require[i]->resolved->provider[j]->sourceheader != currheaderlist->sourceheader) - currheaderlist->require[i]->resolved->provider[j]->sourceheader->childrenrequiredcount[arch]++; + // Update count for required packages if single provider + if (currheaderlist->require[i]->resolved->numproviders == 1) { + 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," "); } } - for (int j = 0; j < currheaderlist->recommend[i]->resolved->numproviders; j++) { - if (currheaderlist->recommend[i]->resolved->provider[j]->sourceheader != currheaderlist->sourceheader) - currheaderlist->recommend[i]->resolved->provider[j]->sourceheader->childrenrequiredcount[arch]++; + // Update count for recommended packages if single provider + if (currheaderlist->recommend[i]->resolved->numproviders == 1) { + 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_depstable_filtered_var(fbd,currheaderlist->sourceheader->require[i]->name); if (currheaderlist->sourceheader->require[i]->resolved) { - for (int j = 0; j < currheaderlist->sourceheader->require[i]->resolved->numproviders; j++) { - if (currheaderlist->sourceheader->require[i]->resolved->provider[j]->sourceheader != currheaderlist->sourceheader) - currheaderlist->sourceheader->require[i]->resolved->provider[j]->sourceheader->childrenrequiredcount[arch]++; + // Update count for required source packages if single provider + if (currheaderlist->sourceheader->require[i]->resolved->numproviders == 1) { + if (currheaderlist->sourceheader->require[i]->resolved->provider[0]->sourceheader != currheaderlist->sourceheader) + currheaderlist->sourceheader->require[i]->resolved->provider[0]->sourceheader->childrenrequiredcount[arch]++; } } }