From 7de992a3e5f1f13ab039fc20d9def1d447f7c980 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 6 Jul 2014 20:15:28 +0200 Subject: [PATCH] Add provider package in pkg_needrebuild() in the form package@provider --- src/distromatic.c | 6 ++---- src/headerlist.c | 5 +++-- src/include/headerlist.h | 3 ++- src/reports.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/distromatic.c b/src/distromatic.c index 144ce59..2cfa964 100644 --- a/src/distromatic.c +++ b/src/distromatic.c @@ -521,12 +521,10 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx) provided->provider[j]->name, provided->provider[j]->arch, ct->repository[provided->provider[j]->altrepository]->tag); - } - fprintf(stderr,"Warning: %s\n",warning); - for (j = 0; j < provided->numproviders; j++) { - addRebuild(provided->provider[j]->sourceheader,currheader->sourceheader); + addRebuild(provided->provider[j]->sourceheader,currheader->sourceheader,provided->provider[j]); addWarning(provided->provider[j]->sourceheader,warning); } + fprintf(stderr,"Warning: %s\n",warning); } else { /* warn about provides provided by obsoleted packages */ k=0; diff --git a/src/headerlist.c b/src/headerlist.c index f0c75a2..d6bbbbc 100644 --- a/src/headerlist.c +++ b/src/headerlist.c @@ -93,7 +93,7 @@ struct warningList* addWarning(struct headerSourceList *pkg, char* text) return pkg->firstwarning; } -struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader) +struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader, struct headerList* provider) { struct rebuildList *currrebuild, *prevrebuild = NULL; @@ -102,7 +102,7 @@ struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSource currrebuild = pkg->firstrebuild; while (currrebuild) { - if (currrebuild->sourceheader == sourceheader) return currrebuild; + if ((currrebuild->sourceheader == sourceheader) && (currrebuild->provider == provider)) return currrebuild; prevrebuild = currrebuild; currrebuild = currrebuild->next; } @@ -112,6 +112,7 @@ struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSource if (!pkg->firstrebuild) pkg->firstrebuild=currrebuild; currrebuild->sourceheader=sourceheader; + currrebuild->provider=provider; currrebuild->next=NULL; if (prevrebuild) prevrebuild->next=currrebuild; diff --git a/src/include/headerlist.h b/src/include/headerlist.h index 51c9c42..7dc2048 100644 --- a/src/include/headerlist.h +++ b/src/include/headerlist.h @@ -63,6 +63,7 @@ struct warningList { struct rebuildList { struct headerSourceList *sourceheader; + struct headerList *provider; struct rebuildList *next; }; @@ -225,7 +226,7 @@ addToHeaderList(struct configTag *ct, struct warningList* addWarning(struct headerSourceList *pkg,char* text); -struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader); +struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader, struct headerList* provider); int getPackageNameFromFile(char *name); diff --git a/src/reports.c b/src/reports.c index ea8f6ed..ecc1b0d 100644 --- a/src/reports.c +++ b/src/reports.c @@ -2097,7 +2097,7 @@ print_datatables(struct configTag *ct, int arch) { } fprintf(fbsh," pkg_needrebuild=("); while (currrebuild) { - fprintf(fbsh, "%s ", currrebuild->sourceheader->name); + fprintf(fbsh, "%s@%s ", currrebuild->sourceheader->name, currrebuild->provider->name); currrebuild = currrebuild->next; } fprintf(fbsh,"); }\n");