Fixes for pkg_needrebuild() and also add rebuilds as warning
This commit is contained in:
parent
e2d17e725a
commit
56baf37545
@ -511,7 +511,6 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
!currheader->obsoleted) k++;
|
!currheader->obsoleted) k++;
|
||||||
}
|
}
|
||||||
if (k == provided->numproviders) { // all provides are from older packages
|
if (k == provided->numproviders) { // all provides are from older packages
|
||||||
addRebuild(provided->provider[j]->sourceheader,currheader->sourceheader);
|
|
||||||
snprintf(warning, PATH_MAX, "%s(%s,%s) requires %s which is only provided by older package(s):",
|
snprintf(warning, PATH_MAX, "%s(%s,%s) requires %s which is only provided by older package(s):",
|
||||||
currheader->name,
|
currheader->name,
|
||||||
currheader->arch,
|
currheader->arch,
|
||||||
@ -525,6 +524,7 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
}
|
}
|
||||||
fprintf(stderr,"Warning: %s\n",warning);
|
fprintf(stderr,"Warning: %s\n",warning);
|
||||||
for (j = 0; j < provided->numproviders; j++) {
|
for (j = 0; j < provided->numproviders; j++) {
|
||||||
|
addRebuild(provided->provider[j]->sourceheader,currheader->sourceheader);
|
||||||
addWarning(provided->provider[j]->sourceheader,warning);
|
addWarning(provided->provider[j]->sourceheader,warning);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -934,7 +934,8 @@ main(int argc, char *argv[])
|
|||||||
*configfile = NULL, *passed_arch = NULL;
|
*configfile = NULL, *passed_arch = NULL;
|
||||||
|
|
||||||
struct headerList *currheaderlist;
|
struct headerList *currheaderlist;
|
||||||
struct headerSourceList *currheadersourcelist = NULL;
|
struct headerSourceList *currheadersourcelist = NULL, *oldheadersourcelist;
|
||||||
|
struct rebuildList *currrebuild;
|
||||||
|
|
||||||
int i = 0,hasbuilds[ARCHS_MAX],ptharg[ARCHS_MAX];
|
int i = 0,hasbuilds[ARCHS_MAX],ptharg[ARCHS_MAX];
|
||||||
pthread_t pth[ARCHS_MAX];
|
pthread_t pth[ARCHS_MAX];
|
||||||
@ -1197,6 +1198,31 @@ main(int argc, char *argv[])
|
|||||||
strncat(warning,configtag->arch[i],PATH_MAX);
|
strncat(warning,configtag->arch[i],PATH_MAX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (warning[0] != '\0') {
|
||||||
|
logmsg(LOG_WARNING, "%s: %s",
|
||||||
|
currheadersourcelist->name,
|
||||||
|
warning);
|
||||||
|
addWarning(currheadersourcelist, warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
warning[0] = '\0';
|
||||||
|
|
||||||
|
currrebuild = currheadersourcelist->firstrebuild;
|
||||||
|
oldheadersourcelist = currheadersourcelist->old;
|
||||||
|
while (!currrebuild && oldheadersourcelist) {
|
||||||
|
currrebuild = oldheadersourcelist->firstrebuild;
|
||||||
|
oldheadersourcelist = oldheadersourcelist->old;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currrebuild) {
|
||||||
|
strncat(warning,"need to be rebuilt:", PATH_MAX);
|
||||||
|
while (currrebuild) {
|
||||||
|
strncat(warning," ",PATH_MAX);
|
||||||
|
strncat(warning,currrebuild->sourceheader->name,PATH_MAX);
|
||||||
|
currrebuild = currrebuild->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (warning[0] != '\0') {
|
if (warning[0] != '\0') {
|
||||||
logmsg(LOG_WARNING, "%s: %s",
|
logmsg(LOG_WARNING, "%s: %s",
|
||||||
currheadersourcelist->name,
|
currheadersourcelist->name,
|
||||||
|
@ -107,14 +107,13 @@ struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSource
|
|||||||
currrebuild = currrebuild->next;
|
currrebuild = currrebuild->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
currrebuild=malloc(sizeof(currrebuild));
|
currrebuild=malloc(sizeof(struct rebuildList));
|
||||||
if (!currrebuild) return NULL;
|
if (!currrebuild) return NULL;
|
||||||
if (!pkg->firstrebuild) pkg->firstrebuild=currrebuild;
|
if (!pkg->firstrebuild) pkg->firstrebuild=currrebuild;
|
||||||
|
|
||||||
currrebuild->sourceheader=sourceheader;
|
currrebuild->sourceheader=sourceheader;
|
||||||
if (!currrebuild->sourceheader) return NULL;
|
|
||||||
|
|
||||||
currrebuild->next=NULL;
|
currrebuild->next=NULL;
|
||||||
|
|
||||||
if (prevrebuild) prevrebuild->next=currrebuild;
|
if (prevrebuild) prevrebuild->next=currrebuild;
|
||||||
return pkg->firstrebuild;
|
return pkg->firstrebuild;
|
||||||
}
|
}
|
||||||
@ -689,6 +688,7 @@ addToSourceHeaderList(struct headerSourceList **headersourcelist, struct configT
|
|||||||
newheadersourcelist->updatingparent = NULL;
|
newheadersourcelist->updatingparent = NULL;
|
||||||
newheadersourcelist->altrepository = altrepository;
|
newheadersourcelist->altrepository = altrepository;
|
||||||
newheadersourcelist->firstwarning = NULL;
|
newheadersourcelist->firstwarning = NULL;
|
||||||
|
newheadersourcelist->firstrebuild = NULL;
|
||||||
newheadersourcelist->old = NULL;
|
newheadersourcelist->old = NULL;
|
||||||
newheadersourcelist->id = ++sourceid;
|
newheadersourcelist->id = ++sourceid;
|
||||||
getPackageInfoIntoHeaderSourceList(h, newheadersourcelist);
|
getPackageInfoIntoHeaderSourceList(h, newheadersourcelist);
|
||||||
|
@ -1773,8 +1773,8 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
contents_filename[1024], warnings_filename[1024], buf[1024];
|
contents_filename[1024], warnings_filename[1024], buf[1024];
|
||||||
char obsoletebuf[PATH_MAX];
|
char obsoletebuf[PATH_MAX];
|
||||||
struct headerList *currheaderlist, *currchild;
|
struct headerList *currheaderlist, *currchild;
|
||||||
struct headerSourceList * currheadersourcelist;
|
struct headerSourceList *currheadersourcelist, *oldheadersourcelist;
|
||||||
struct rebuildList * currrebuild;
|
struct rebuildList *currrebuild;
|
||||||
int i, nonobsoletednumproviders;
|
int i, nonobsoletednumproviders;
|
||||||
|
|
||||||
snprintf(builddeps_filename,1024,"%sbuilddeps-%s",ct->html_dir,ct->arch[arch]);
|
snprintf(builddeps_filename,1024,"%sbuilddeps-%s",ct->html_dir,ct->arch[arch]);
|
||||||
@ -2088,13 +2088,20 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
}
|
}
|
||||||
fprintf(fbsh,"); pkg_obsoletes=(%s);",obsoletebuf);
|
fprintf(fbsh,"); pkg_obsoletes=(%s);",obsoletebuf);
|
||||||
|
|
||||||
fprintf(fbsh,"pkg_needrebuild=(");
|
/* find pointer to firstrebuild also looking into old packages */
|
||||||
currrebuild=currheadersourcelist->firstrebuild;
|
currrebuild = currheadersourcelist->firstrebuild;
|
||||||
|
oldheadersourcelist = currheadersourcelist->old;
|
||||||
|
while (!currrebuild && oldheadersourcelist) {
|
||||||
|
currrebuild = oldheadersourcelist->firstrebuild;
|
||||||
|
oldheadersourcelist = oldheadersourcelist->old;
|
||||||
|
}
|
||||||
|
fprintf(fbsh," pkg_needrebuild=(");
|
||||||
while (currrebuild) {
|
while (currrebuild) {
|
||||||
fprintf(fbsh, "%s ", currrebuild->sourceheader->name);
|
fprintf(fbsh, "%s ", currrebuild->sourceheader->name);
|
||||||
currrebuild = currrebuild->next;
|
currrebuild = currrebuild->next;
|
||||||
}
|
}
|
||||||
fprintf(fb,"); }\n\n");
|
fprintf(fbsh,"); }\n");
|
||||||
|
fprintf(fb,"\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user