reports.c: added generation on warnings-*.sh files and added warnings_list in builds-*.sh
This commit is contained in:
parent
00a537a56e
commit
1570c792be
@ -81,7 +81,7 @@ comparePackagers(const void *ptr1, const void *ptr2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
printHTMLWarnings(FILE *fout,struct configTag *configtag, struct headerSourceList* pkg, int mode) {
|
printHTMLWarnings(FILE *fout, struct configTag *configtag, struct headerSourceList* pkg, int mode) {
|
||||||
|
|
||||||
char warningsfile[PATH_MAX];
|
char warningsfile[PATH_MAX];
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
@ -140,6 +140,8 @@ printHTMLWarnings(FILE *fout,struct configTag *configtag, struct headerSourceLis
|
|||||||
fprintf(fout," • %s\n",currwarning->text);
|
fprintf(fout," • %s\n",currwarning->text);
|
||||||
} else if (mode == 1) {
|
} else if (mode == 1) {
|
||||||
fprintf(fout," • %s<br>",currwarning->text);
|
fprintf(fout," • %s<br>",currwarning->text);
|
||||||
|
} else if (mode == 2) {
|
||||||
|
fprintf(fout,"%s %s\n",pkg->name,currwarning->text);
|
||||||
}
|
}
|
||||||
currwarning = currwarning->next;
|
currwarning = currwarning->next;
|
||||||
}
|
}
|
||||||
@ -1787,10 +1789,10 @@ void print_contents_subtree(FILE *f,
|
|||||||
int
|
int
|
||||||
print_datatables(struct configTag *ct, int arch) {
|
print_datatables(struct configTag *ct, int arch) {
|
||||||
|
|
||||||
FILE *fbd,*fd,*fv,*fb,*fbsh,*fs,*fc;
|
FILE *fbd,*fd,*fv,*fb,*fbsh,*fs,*fc,*fw;
|
||||||
char builddeps_filename[1024], deps_filename[1024], virtual_filename[1024],
|
char builddeps_filename[1024], deps_filename[1024], virtual_filename[1024],
|
||||||
builds_filename[1024], builds_sh_filename[1024], sources_filename[1024],
|
builds_filename[1024], builds_sh_filename[1024], sources_filename[1024],
|
||||||
contents_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;
|
||||||
@ -1802,8 +1804,8 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
snprintf(builds_filename,1024,"%sbuilds-%s",ct->html_dir,ct->arch[arch]);
|
snprintf(builds_filename,1024,"%sbuilds-%s",ct->html_dir,ct->arch[arch]);
|
||||||
snprintf(builds_sh_filename,1024,"%sbuilds-%s.sh",ct->html_dir,ct->arch[arch]);
|
snprintf(builds_sh_filename,1024,"%sbuilds-%s.sh",ct->html_dir,ct->arch[arch]);
|
||||||
snprintf(sources_filename,1024,"%ssources-%s",ct->html_dir,ct->arch[arch]);
|
snprintf(sources_filename,1024,"%ssources-%s",ct->html_dir,ct->arch[arch]);
|
||||||
|
|
||||||
snprintf(contents_filename,1024,"%scontentslist-%s",ct->repository_dir,ct->arch[arch]);
|
snprintf(contents_filename,1024,"%scontentslist-%s",ct->repository_dir,ct->arch[arch]);
|
||||||
|
snprintf(warnings_filename,1024,"%swarnings-%s",ct->repository_dir,ct->arch[arch]);
|
||||||
|
|
||||||
fbd=fopen(builddeps_filename,"w");
|
fbd=fopen(builddeps_filename,"w");
|
||||||
if (!fbd) {
|
if (!fbd) {
|
||||||
@ -1847,6 +1849,12 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fw=fopen(warnings_filename,"w");
|
||||||
|
if (!fw) {
|
||||||
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", warnings_filename);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// headerlist scan: write top of deps and sources files
|
// headerlist scan: write top of deps and sources files
|
||||||
//
|
//
|
||||||
@ -2037,6 +2045,17 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
}
|
}
|
||||||
fprintf(fbsh,");\n");
|
fprintf(fbsh,");\n");
|
||||||
|
|
||||||
|
fprintf(fbsh,"warnings_list=(");
|
||||||
|
currheadersourcelist = ct->headersourcelist;
|
||||||
|
while (currheadersourcelist != NULL) {
|
||||||
|
if ((currheadersourcelist->altrepository == ct->repository_level) &&
|
||||||
|
(printHTMLWarnings(fw,ct,currheadersourcelist,2) == 1)) {
|
||||||
|
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
||||||
|
}
|
||||||
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
|
}
|
||||||
|
fprintf(fbsh,");\n");
|
||||||
|
|
||||||
currheadersourcelist = ct->headersourcelist;
|
currheadersourcelist = ct->headersourcelist;
|
||||||
logmsg(LOG_DEBUG,"writing builds and sources files (2)");
|
logmsg(LOG_DEBUG,"writing builds and sources files (2)");
|
||||||
while (currheadersourcelist != NULL) {
|
while (currheadersourcelist != NULL) {
|
||||||
@ -2096,6 +2115,7 @@ print_datatables(struct configTag *ct, int arch) {
|
|||||||
fclose(fb);
|
fclose(fb);
|
||||||
fclose(fs);
|
fclose(fs);
|
||||||
fclose(fc);
|
fclose(fc);
|
||||||
|
fclose(fw);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user