Add rebuildList to source headers to output pkg_needrebuild() in build-*.sh files
This commit is contained in:
parent
9e403c278f
commit
e2d17e725a
@ -511,6 +511,7 @@ 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,
|
||||||
|
@ -93,6 +93,32 @@ struct warningList* addWarning(struct headerSourceList *pkg, char* text)
|
|||||||
return pkg->firstwarning;
|
return pkg->firstwarning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader)
|
||||||
|
{
|
||||||
|
struct rebuildList *currrebuild, *prevrebuild = NULL;
|
||||||
|
|
||||||
|
if (!pkg) return NULL;
|
||||||
|
|
||||||
|
currrebuild = pkg->firstrebuild;
|
||||||
|
|
||||||
|
while (currrebuild) {
|
||||||
|
if (currrebuild->sourceheader == sourceheader) return currrebuild;
|
||||||
|
prevrebuild = currrebuild;
|
||||||
|
currrebuild = currrebuild->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
currrebuild=malloc(sizeof(currrebuild));
|
||||||
|
if (!currrebuild) return NULL;
|
||||||
|
if (!pkg->firstrebuild) pkg->firstrebuild=currrebuild;
|
||||||
|
|
||||||
|
currrebuild->sourceheader=sourceheader;
|
||||||
|
if (!currrebuild->sourceheader) return NULL;
|
||||||
|
|
||||||
|
currrebuild->next=NULL;
|
||||||
|
if (prevrebuild) prevrebuild->next=currrebuild;
|
||||||
|
return pkg->firstrebuild;
|
||||||
|
}
|
||||||
|
|
||||||
struct headerList *
|
struct headerList *
|
||||||
findPackageByName(struct headerList *list, char *name)
|
findPackageByName(struct headerList *list, char *name)
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,11 @@ struct warningList {
|
|||||||
struct warningList *next;
|
struct warningList *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct rebuildList {
|
||||||
|
struct headerSourceList *sourceheader;
|
||||||
|
struct rebuildList *next;
|
||||||
|
};
|
||||||
|
|
||||||
struct Require {
|
struct Require {
|
||||||
char *name;
|
char *name;
|
||||||
long flags;
|
long flags;
|
||||||
@ -139,6 +144,7 @@ struct headerSourceList {
|
|||||||
struct headerList *firstchild[ARCHS_MAX];
|
struct headerList *firstchild[ARCHS_MAX];
|
||||||
struct warningList *firstwarning;
|
struct warningList *firstwarning;
|
||||||
struct headerSourceList *updatingparent;
|
struct headerSourceList *updatingparent;
|
||||||
|
struct rebuildList *firstrebuild;
|
||||||
long id;
|
long id;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -219,6 +225,8 @@ addToHeaderList(struct configTag *ct,
|
|||||||
|
|
||||||
struct warningList* addWarning(struct headerSourceList *pkg,char* text);
|
struct warningList* addWarning(struct headerSourceList *pkg,char* text);
|
||||||
|
|
||||||
|
struct rebuildList* addRebuild(struct headerSourceList *pkg, struct headerSourceList* sourceheader);
|
||||||
|
|
||||||
int getPackageNameFromFile(char *name);
|
int getPackageNameFromFile(char *name);
|
||||||
|
|
||||||
#endif /* HEADERLIST_H */
|
#endif /* HEADERLIST_H */
|
||||||
|
@ -1774,6 +1774,7 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
char obsoletebuf[PATH_MAX];
|
char obsoletebuf[PATH_MAX];
|
||||||
struct headerList *currheaderlist, *currchild;
|
struct headerList *currheaderlist, *currchild;
|
||||||
struct headerSourceList * currheadersourcelist;
|
struct headerSourceList * currheadersourcelist;
|
||||||
|
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]);
|
||||||
@ -2085,8 +2086,16 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
currchild = currchild->nextbrother;
|
currchild = currchild->nextbrother;
|
||||||
if (currchild) fprintf(fbsh," ");
|
if (currchild) fprintf(fbsh," ");
|
||||||
}
|
}
|
||||||
fprintf(fbsh,"); pkg_obsoletes=(%s); }\n",obsoletebuf);
|
fprintf(fbsh,"); pkg_obsoletes=(%s);",obsoletebuf);
|
||||||
fprintf(fb,"\n");
|
|
||||||
|
fprintf(fbsh,"pkg_needrebuild=(");
|
||||||
|
currrebuild=currheadersourcelist->firstrebuild;
|
||||||
|
while (currrebuild) {
|
||||||
|
fprintf(fbsh, "%s ", currrebuild->sourceheader->name);
|
||||||
|
currrebuild = currrebuild->next;
|
||||||
|
}
|
||||||
|
fprintf(fb,"); }\n\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user