Commit 7de992a3e5f1f13ab039fc20d9def1d447f7c980

Authored by Silvan Calarco
1 parent 56baf37545
Exists in master

Add provider package in pkg_needrebuild() in the form package@provider

Showing 4 changed files with 8 additions and 8 deletions Side-by-side Diff

... ... @@ -521,12 +521,10 @@
521 521 provided->provider[j]->name,
522 522 provided->provider[j]->arch,
523 523 ct->repository[provided->provider[j]->altrepository]->tag);
524   - }
525   - fprintf(stderr,"Warning: %s\n",warning);
526   - for (j = 0; j < provided->numproviders; j++) {
527   - addRebuild(provided->provider[j]->sourceheader,currheader->sourceheader);
  524 + addRebuild(provided->provider[j]->sourceheader,currheader->sourceheader,provided->provider[j]);
528 525 addWarning(provided->provider[j]->sourceheader,warning);
529 526 }
  527 + fprintf(stderr,"Warning: %s\n",warning);
530 528 } else {
531 529 /* warn about provides provided by obsoleted packages */
532 530 k=0;
... ... @@ -93,7 +93,7 @@
93 93 return pkg->firstwarning;
94 94 }
95 95  
96   -struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader)
  96 +struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader, struct headerList* provider)
97 97 {
98 98 struct rebuildList *currrebuild, *prevrebuild = NULL;
99 99  
... ... @@ -102,7 +102,7 @@
102 102 currrebuild = pkg->firstrebuild;
103 103  
104 104 while (currrebuild) {
105   - if (currrebuild->sourceheader == sourceheader) return currrebuild;
  105 + if ((currrebuild->sourceheader == sourceheader) && (currrebuild->provider == provider)) return currrebuild;
106 106 prevrebuild = currrebuild;
107 107 currrebuild = currrebuild->next;
108 108 }
... ... @@ -112,6 +112,7 @@
112 112 if (!pkg->firstrebuild) pkg->firstrebuild=currrebuild;
113 113  
114 114 currrebuild->sourceheader=sourceheader;
  115 + currrebuild->provider=provider;
115 116 currrebuild->next=NULL;
116 117  
117 118 if (prevrebuild) prevrebuild->next=currrebuild;
src/include/headerlist.h
... ... @@ -63,6 +63,7 @@
63 63  
64 64 struct rebuildList {
65 65 struct headerSourceList *sourceheader;
  66 + struct headerList *provider;
66 67 struct rebuildList *next;
67 68 };
68 69  
... ... @@ -225,7 +226,7 @@
225 226  
226 227 struct warningList* addWarning(struct headerSourceList *pkg,char* text);
227 228  
228   -struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader);
  229 +struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader, struct headerList* provider);
229 230  
230 231 int getPackageNameFromFile(char *name);
231 232  
... ... @@ -2097,7 +2097,7 @@
2097 2097 }
2098 2098 fprintf(fbsh," pkg_needrebuild=(");
2099 2099 while (currrebuild) {
2100   - fprintf(fbsh, "%s ", currrebuild->sourceheader->name);
  2100 + fprintf(fbsh, "%s@%s ", currrebuild->sourceheader->name, currrebuild->provider->name);
2101 2101 currrebuild = currrebuild->next;
2102 2102 }
2103 2103 fprintf(fbsh,"); }\n");