reports.c: other indentation fixes
This commit is contained in:
parent
b70cb5cf71
commit
8445407e9c
613
src/reports.c
613
src/reports.c
@ -1665,348 +1665,341 @@ int print_contentslist(struct configTag *ct, int arch) {
|
|||||||
|
|
||||||
int print_datatables(struct configTag *ct, int arch) {
|
int print_datatables(struct configTag *ct, int arch) {
|
||||||
|
|
||||||
FILE *fbd,*fd,*fv,*fb,*fbsh,*fs,*fw;
|
FILE *fbd,*fd,*fv,*fb,*fbsh,*fs,*fw;
|
||||||
char builddeps_filename[PATH_MAX], deps_filename[PATH_MAX], virtual_filename[PATH_MAX],
|
char builddeps_filename[PATH_MAX], deps_filename[PATH_MAX], virtual_filename[PATH_MAX],
|
||||||
builds_filename[PATH_MAX], builds_sh_filename[PATH_MAX], sources_filename[PATH_MAX],
|
builds_filename[PATH_MAX], builds_sh_filename[PATH_MAX], sources_filename[PATH_MAX],
|
||||||
warnings_filename[PATH_MAX];
|
warnings_filename[PATH_MAX];
|
||||||
char obsoletebuf[OBSOLETEBUF_SIZE];
|
char obsoletebuf[OBSOLETEBUF_SIZE];
|
||||||
struct headerList *currheaderlist, *currchild;
|
struct headerList *currheaderlist, *currchild;
|
||||||
struct headerSourceList *currheadersourcelist, *oldheadersourcelist;
|
struct headerSourceList *currheadersourcelist, *oldheadersourcelist;
|
||||||
struct rebuildList *currrebuild;
|
struct rebuildList *currrebuild;
|
||||||
int i, nonobsoletednumproviders;
|
int i, nonobsoletednumproviders;
|
||||||
|
|
||||||
snprintf(builddeps_filename, PATH_MAX, "%sbuilddeps-%s", ct->html_dir, ct->arch[arch]);
|
snprintf(builddeps_filename, PATH_MAX, "%sbuilddeps-%s", ct->html_dir, ct->arch[arch]);
|
||||||
snprintf(deps_filename, PATH_MAX, "%sdeps-%s", ct->html_dir, ct->arch[arch]);
|
snprintf(deps_filename, PATH_MAX, "%sdeps-%s", ct->html_dir, ct->arch[arch]);
|
||||||
snprintf(virtual_filename, PATH_MAX, "%svirtual-%s", ct->html_dir, ct->arch[arch]);
|
snprintf(virtual_filename, PATH_MAX, "%svirtual-%s", ct->html_dir, ct->arch[arch]);
|
||||||
snprintf(builds_filename, PATH_MAX, "%sbuilds-%s", ct->html_dir, ct->arch[arch]);
|
snprintf(builds_filename, PATH_MAX, "%sbuilds-%s", ct->html_dir, ct->arch[arch]);
|
||||||
snprintf(builds_sh_filename, PATH_MAX, "%sbuilds-%s.sh", ct->html_dir, ct->arch[arch]);
|
snprintf(builds_sh_filename, PATH_MAX, "%sbuilds-%s.sh", ct->html_dir, ct->arch[arch]);
|
||||||
snprintf(sources_filename, PATH_MAX, "%ssources-%s", ct->html_dir, ct->arch[arch]);
|
snprintf(sources_filename, PATH_MAX, "%ssources-%s", ct->html_dir, ct->arch[arch]);
|
||||||
snprintf(warnings_filename, PATH_MAX, "%swarnings-%s", ct->repository_dir, ct->arch[arch]);
|
snprintf(warnings_filename, PATH_MAX, "%swarnings-%s", ct->repository_dir, ct->arch[arch]);
|
||||||
|
|
||||||
fbd=fopen(builddeps_filename,"w");
|
fbd=fopen(builddeps_filename,"w");
|
||||||
if (!fbd) {
|
if (!fbd) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", builddeps_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", builddeps_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd=fopen(deps_filename,"w");
|
fd=fopen(deps_filename,"w");
|
||||||
if (!fd) {
|
if (!fd) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", deps_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", deps_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fv=fopen(virtual_filename,"w");
|
fv=fopen(virtual_filename,"w");
|
||||||
if (!fv) {
|
if (!fv) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", virtual_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", virtual_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fb=fopen(builds_filename,"w");
|
fb=fopen(builds_filename,"w");
|
||||||
if (!fb) {
|
if (!fb) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", builds_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", builds_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fbsh=fopen(builds_sh_filename,"w");
|
fbsh=fopen(builds_sh_filename,"w");
|
||||||
if (!fbsh) {
|
if (!fbsh) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", builds_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", builds_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs=fopen(sources_filename,"w");
|
fs=fopen(sources_filename,"w");
|
||||||
if (!fs) {
|
if (!fs) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", sources_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", sources_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fw=fopen(warnings_filename,"w");
|
fw=fopen(warnings_filename,"w");
|
||||||
if (!fw) {
|
if (!fw) {
|
||||||
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", warnings_filename);
|
fprintf(stderr, "Error: can't open file for writing: %s. Aborting.\n", warnings_filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// headerlist scan: write top of deps and sources files
|
// headerlist scan: write top of deps and sources files
|
||||||
//
|
//
|
||||||
fprintf(fd,"ALL_PACKAGES = ");
|
fprintf(fd,"ALL_PACKAGES = ");
|
||||||
fprintf(fb,"ALL_BUILDS=");
|
fprintf(fb,"ALL_BUILDS=");
|
||||||
currheaderlist = ct->headerlist[arch];
|
currheaderlist = ct->headerlist[arch];
|
||||||
while (currheaderlist) {
|
while (currheaderlist) {
|
||||||
fprintf(fs,"%s: _%s\n", currheaderlist->name, currheaderlist->sourceheader->name);
|
fprintf(fs,"%s: _%s\n", currheaderlist->name, currheaderlist->sourceheader->name);
|
||||||
fprintf(fd,"%s ", currheaderlist->name);
|
fprintf(fd,"%s ", currheaderlist->name);
|
||||||
fprintf(fb,"%s ",currheaderlist->name);
|
fprintf(fb,"%s ",currheaderlist->name);
|
||||||
currheaderlist = currheaderlist->next;
|
currheaderlist = currheaderlist->next;
|
||||||
}
|
}
|
||||||
fprintf(fd,"\n");
|
fprintf(fd,"\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// source headerlist scan: write top of deps and sources files
|
// source headerlist scan: write top of deps and sources files
|
||||||
//
|
//
|
||||||
fprintf(fbd,"ALL_SOURCES = ");
|
fprintf(fbd,"ALL_SOURCES = ");
|
||||||
fprintf(fs,"ALL_SOURCES = ");
|
fprintf(fs,"ALL_SOURCES = ");
|
||||||
currheadersourcelist = ct->headersourcelist;
|
currheadersourcelist = ct->headersourcelist;
|
||||||
while (currheadersourcelist) {
|
while (currheadersourcelist) {
|
||||||
if (currheadersourcelist->firstchild[arch]) {
|
if (currheadersourcelist->firstchild[arch]) {
|
||||||
fprintf(fbd,"%s ", currheadersourcelist->name);
|
fprintf(fbd,"%s ", currheadersourcelist->name);
|
||||||
fprintf(fs,"_%s ", currheadersourcelist->name);
|
fprintf(fs,"_%s ", currheadersourcelist->name);
|
||||||
}
|
}
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
}
|
}
|
||||||
fprintf(fbd,"\n");
|
fprintf(fbd,"\n");
|
||||||
fprintf(fs,"\n");
|
fprintf(fs,"\n");
|
||||||
fprintf(fb,"\n");
|
fprintf(fb,"\n");
|
||||||
|
|
||||||
// write deps file
|
// write deps file
|
||||||
logmsg(LOG_DEBUG,"writing deps files (1)");
|
logmsg(LOG_DEBUG,"writing deps files (1)");
|
||||||
struct providedList* provided = ct->providedlist_idx[arch][0];
|
struct providedList* provided = ct->providedlist_idx[arch][0];
|
||||||
while (provided) {
|
while (provided) {
|
||||||
if (!strncmp("debuginfo(build-id)", provided->name, 20)) {
|
if (!strncmp("debuginfo(build-id)", provided->name, 20)) {
|
||||||
provided = provided->next;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
nonobsoletednumproviders=0;
|
|
||||||
for (i = 0; i < provided->numproviders; i++) {
|
|
||||||
// skip duplicated provides
|
|
||||||
if (i > 0) {
|
|
||||||
if (provided->provider[i] == provided->provider[i-1]) continue;
|
|
||||||
else if (!strcmp(provided->provider[i]->name,provided->provider[i-1]->name) &&
|
|
||||||
!provided->provider[i-1]->obsoleted) continue;
|
|
||||||
}
|
|
||||||
if (!provided->provider[i]->obsoleted) nonobsoletednumproviders++;
|
|
||||||
}
|
|
||||||
if (nonobsoletednumproviders > 1) {
|
|
||||||
fprintf(fd,"ifndef ");
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,"\n");
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd," := ");
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,"_to_be_defined # ");
|
|
||||||
|
|
||||||
fprintf_depstable_filtered_var(fs,provided->name);
|
|
||||||
fprintf(fs,":");
|
|
||||||
for (i = 0; i < provided->numproviders; i++) {
|
|
||||||
if (!provided->provider[i]->obsoleted) {
|
|
||||||
if (i == 0 || strcmp(provided->provider[i-1]->name,
|
|
||||||
provided->provider[i]->name))
|
|
||||||
fprintf(fd,"%s ",provided->provider[i]->name);
|
|
||||||
if (i == 0 || strcmp(provided->provider[i-1]->sourceheader->name,
|
|
||||||
provided->provider[i]->sourceheader->name))
|
|
||||||
fprintf(fs," _%s",provided->provider[i]->sourceheader->name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(fs,"\n");
|
|
||||||
|
|
||||||
fprintf(fd,"\nendif\n");
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,": ");
|
|
||||||
fprintf(fd,"$(");
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,")\n");
|
|
||||||
|
|
||||||
fprintf(fv,"%s= # ",provided->name);
|
|
||||||
for (i = 0; i < provided->numproviders; i++) {
|
|
||||||
if (!provided->provider[i]->obsoleted) {
|
|
||||||
if (i == 0 || strcmp(provided->provider[i-1]->name,
|
|
||||||
provided->provider[i]->name))
|
|
||||||
fprintf(fv,"%s ",provided->provider[i]->name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(fv,"\n");
|
|
||||||
} else if (nonobsoletednumproviders == 1) {
|
|
||||||
for (i = 0; i < provided->numproviders; i++) {
|
|
||||||
if (!provided->provider[i]->obsoleted) break;
|
|
||||||
}
|
|
||||||
if (strcmp(provided->name,provided->provider[i]->name)) {
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,": ");
|
|
||||||
fprintf(fd,"%s\n",provided->provider[i]->name);
|
|
||||||
fprintf_depstable_filtered_var(fs,provided->name);
|
|
||||||
fprintf(fs,": _%s\n",provided->provider[i]->sourceheader->name);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,": ");
|
|
||||||
fprintf(fd,"__missing_provider_for_");
|
|
||||||
fprintf_depstable_filtered_var(fd,provided->name);
|
|
||||||
fprintf(fd,"\n");
|
|
||||||
}
|
|
||||||
provided = provided->next;
|
provided = provided->next;
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
nonobsoletednumproviders=0;
|
||||||
|
for (i = 0; i < provided->numproviders; i++) {
|
||||||
|
// skip duplicated provides
|
||||||
|
if (i > 0) {
|
||||||
|
if (provided->provider[i] == provided->provider[i-1]) continue;
|
||||||
|
else if (!strcmp(provided->provider[i]->name,provided->provider[i-1]->name) &&
|
||||||
|
!provided->provider[i-1]->obsoleted) continue;
|
||||||
|
}
|
||||||
|
if (!provided->provider[i]->obsoleted) nonobsoletednumproviders++;
|
||||||
|
}
|
||||||
|
if (nonobsoletednumproviders > 1) {
|
||||||
|
fprintf(fd,"ifndef ");
|
||||||
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
|
fprintf(fd,"\n");
|
||||||
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
|
fprintf(fd," := ");
|
||||||
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
|
fprintf(fd,"_to_be_defined # ");
|
||||||
|
fprintf_depstable_filtered_var(fs,provided->name);
|
||||||
|
fprintf(fs,":");
|
||||||
|
for (i = 0; i < provided->numproviders; i++) {
|
||||||
|
if (!provided->provider[i]->obsoleted) {
|
||||||
|
if (i == 0 || strcmp(provided->provider[i-1]->name,
|
||||||
|
provided->provider[i]->name))
|
||||||
|
fprintf(fd,"%s ",provided->provider[i]->name);
|
||||||
|
if (i == 0 || strcmp(provided->provider[i-1]->sourceheader->name,
|
||||||
|
provided->provider[i]->sourceheader->name))
|
||||||
|
fprintf(fs," _%s",provided->provider[i]->sourceheader->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(fs,"\n");
|
||||||
|
|
||||||
logmsg(LOG_DEBUG,"writing deps files (2)");
|
fprintf(fd,"\nendif\n");
|
||||||
currheaderlist = ct->headerlist[arch];
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
while (currheaderlist) {
|
fprintf(fd,": ");
|
||||||
fprintf(fd,"%s: ", currheaderlist->name);
|
fprintf(fd,"$(");
|
||||||
for (i = 0; i < currheaderlist->requirecount; i++) {
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
if (currheaderlist->require[i]->resolved) {
|
fprintf(fd,")\n");
|
||||||
if (currheaderlist->require[i]->resolved->numproviders == 0) {
|
|
||||||
fprintf_depstable_filtered_var(fd,currheaderlist->require[i]->resolved->name);
|
|
||||||
fprintf(fd,"_unresolved_ ");
|
|
||||||
}
|
|
||||||
else if (currheaderlist->require[i]->resolved->numproviders == 1) {
|
|
||||||
if ((i == 0 ||
|
|
||||||
!currheaderlist->require[i-1]->resolved ||
|
|
||||||
!currheaderlist->require[i-1]->resolved->numproviders ||
|
|
||||||
strcmp(currheaderlist->require[i-1]->resolved->provider[0]->name,
|
|
||||||
currheaderlist->require[i]->resolved->provider[0]->name)) &&
|
|
||||||
strcmp(currheaderlist->name,
|
|
||||||
currheaderlist->require[i]->resolved->provider[0]->name))
|
|
||||||
fprintf(fd,"%s ",currheaderlist->require[i]->resolved->provider[0]->name);
|
|
||||||
} else {
|
|
||||||
if (i == 0 ||
|
|
||||||
!currheaderlist->require[i-1]->resolved ||
|
|
||||||
!currheaderlist->require[i-1]->resolved->numproviders ||
|
|
||||||
strcmp(currheaderlist->require[i-1]->resolved->name,
|
|
||||||
currheaderlist->require[i]->resolved->name)) {
|
|
||||||
fprintf_depstable_filtered_var(fd,currheaderlist->require[i]->resolved->name);
|
|
||||||
fprintf(fd," ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(fd,"\n");
|
|
||||||
|
|
||||||
//
|
fprintf(fv,"%s= # ",provided->name);
|
||||||
// write builddeps file
|
for (i = 0; i < provided->numproviders; i++) {
|
||||||
//
|
if (!provided->provider[i]->obsoleted) {
|
||||||
fprintf(fbd,"%s:",currheaderlist->name);
|
if (i == 0 || strcmp(provided->provider[i-1]->name,
|
||||||
for (i = 0; i < currheaderlist->sourceheader->requirecount; i++) {
|
provided->provider[i]->name))
|
||||||
if (strncmp("rpmlib(",currheaderlist->sourceheader->require[i]->name,7) &&
|
fprintf(fv,"%s ",provided->provider[i]->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(fv,"\n");
|
||||||
|
} else if (nonobsoletednumproviders == 1) {
|
||||||
|
for (i = 0; i < provided->numproviders; i++) {
|
||||||
|
if (!provided->provider[i]->obsoleted) break;
|
||||||
|
}
|
||||||
|
if (strcmp(provided->name,provided->provider[i]->name)) {
|
||||||
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
|
fprintf(fd,": ");
|
||||||
|
fprintf(fd,"%s\n",provided->provider[i]->name);
|
||||||
|
fprintf_depstable_filtered_var(fs,provided->name);
|
||||||
|
fprintf(fs,": _%s\n",provided->provider[i]->sourceheader->name);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
|
fprintf(fd,": ");
|
||||||
|
fprintf(fd,"__missing_provider_for_");
|
||||||
|
fprintf_depstable_filtered_var(fd,provided->name);
|
||||||
|
fprintf(fd,"\n");
|
||||||
|
}
|
||||||
|
provided = provided->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
logmsg(LOG_DEBUG,"writing deps files (2)");
|
||||||
|
currheaderlist = ct->headerlist[arch];
|
||||||
|
while (currheaderlist) {
|
||||||
|
fprintf(fd,"%s: ", currheaderlist->name);
|
||||||
|
for (i = 0; i < currheaderlist->requirecount; i++) {
|
||||||
|
if (currheaderlist->require[i]->resolved) {
|
||||||
|
if (currheaderlist->require[i]->resolved->numproviders == 0) {
|
||||||
|
fprintf_depstable_filtered_var(fd,currheaderlist->require[i]->resolved->name);
|
||||||
|
fprintf(fd,"_unresolved_ ");
|
||||||
|
} else if (currheaderlist->require[i]->resolved->numproviders == 1) {
|
||||||
|
if ((i == 0 ||
|
||||||
|
!currheaderlist->require[i-1]->resolved ||
|
||||||
|
!currheaderlist->require[i-1]->resolved->numproviders ||
|
||||||
|
strcmp(currheaderlist->require[i-1]->resolved->provider[0]->name,
|
||||||
|
currheaderlist->require[i]->resolved->provider[0]->name)) &&
|
||||||
|
strcmp(currheaderlist->name,
|
||||||
|
currheaderlist->require[i]->resolved->provider[0]->name))
|
||||||
|
fprintf(fd,"%s ",currheaderlist->require[i]->resolved->provider[0]->name);
|
||||||
|
} else {
|
||||||
|
if (i == 0 ||
|
||||||
|
!currheaderlist->require[i-1]->resolved ||
|
||||||
|
!currheaderlist->require[i-1]->resolved->numproviders ||
|
||||||
|
strcmp(currheaderlist->require[i-1]->resolved->name,
|
||||||
|
currheaderlist->require[i]->resolved->name)) {
|
||||||
|
fprintf_depstable_filtered_var(fd,currheaderlist->require[i]->resolved->name);
|
||||||
|
fprintf(fd," ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(fd,"\n");
|
||||||
|
|
||||||
|
//
|
||||||
|
// write builddeps file
|
||||||
|
//
|
||||||
|
fprintf(fbd,"%s:",currheaderlist->name);
|
||||||
|
for (i = 0; i < currheaderlist->sourceheader->requirecount; i++) {
|
||||||
|
if (strncmp("rpmlib(",currheaderlist->sourceheader->require[i]->name,7) &&
|
||||||
strncmp("debuginfo(build-id)",currheaderlist->sourceheader->require[i]->name,20)) {
|
strncmp("debuginfo(build-id)",currheaderlist->sourceheader->require[i]->name,20)) {
|
||||||
fprintf(fbd," ");
|
fprintf(fbd," ");
|
||||||
fprintf_depstable_filtered_var(fbd,currheaderlist->sourceheader->require[i]->name);
|
fprintf_depstable_filtered_var(fbd,currheaderlist->sourceheader->require[i]->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fbd,"\n");
|
fprintf(fbd,"\n");
|
||||||
|
|
||||||
/*for (i = 0; i < currheaderlist->obsoletecount; i++) {
|
/*for (i = 0; i < currheaderlist->obsoletecount; i++) {
|
||||||
fprintf(fbd,"%s: %s\n",currheaderlist->obsoletename[i],currheaderlist->name);
|
fprintf(fbd,"%s: %s\n",currheaderlist->obsoletename[i],currheaderlist->name);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
for (i = 0; i < currheaderlist->providecount; i++) {
|
for (i = 0; i < currheaderlist->providecount; i++) {
|
||||||
if (strncmp(currheaderlist->provided[i]->name,currheaderlist->name,PATH_MAX) != 0) {
|
if (strncmp(currheaderlist->provided[i]->name,currheaderlist->name,PATH_MAX) != 0) {
|
||||||
fprintf_depstable_filtered_var(fbd,currheaderlist->provided[i]->name);
|
fprintf_depstable_filtered_var(fbd,currheaderlist->provided[i]->name);
|
||||||
fprintf(fbd,": %s\n",currheaderlist->name);
|
fprintf(fbd,": %s\n",currheaderlist->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
currheaderlist = currheaderlist->next;
|
currheaderlist = currheaderlist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// headersourcelist scan: write builds and sources files
|
// headersourcelist scan: write builds and sources files
|
||||||
//
|
//
|
||||||
logmsg(LOG_DEBUG,"writing builds and sources files (1)");
|
logmsg(LOG_DEBUG,"writing builds and sources files (1)");
|
||||||
fprintf(fbsh,"pkg_list=(");
|
fprintf(fbsh,"pkg_list=(");
|
||||||
currheadersourcelist = ct->headersourcelist;
|
currheadersourcelist = ct->headersourcelist;
|
||||||
while (currheadersourcelist != NULL) {
|
while (currheadersourcelist != NULL) {
|
||||||
if (((ct->repository_level == 0) ||
|
if (((ct->repository_level == 0) ||
|
||||||
(currheadersourcelist->altrepository == ct->repository_level)) &&
|
(currheadersourcelist->altrepository == ct->repository_level)) &&
|
||||||
(currheadersourcelist->firstchild[arch])) {
|
(currheadersourcelist->firstchild[arch])) {
|
||||||
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
||||||
}
|
}
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
}
|
}
|
||||||
fprintf(fbsh,");\n");
|
fprintf(fbsh,");\n");
|
||||||
|
|
||||||
fprintf(fbsh,"needport_list=(");
|
fprintf(fbsh,"needport_list=(");
|
||||||
currheadersourcelist = ct->headersourcelist;
|
currheadersourcelist = ct->headersourcelist;
|
||||||
while (currheadersourcelist != NULL) {
|
while (currheadersourcelist != NULL) {
|
||||||
if (!currheadersourcelist->firstchild[arch] &&
|
if (!currheadersourcelist->firstchild[arch] &&
|
||||||
currheadersourcelist->old &&
|
currheadersourcelist->old &&
|
||||||
currheadersourcelist->old->firstchild[arch] &&
|
currheadersourcelist->old->firstchild[arch] &&
|
||||||
(currheadersourcelist->altrepository == ct->repository_level)) {
|
(currheadersourcelist->altrepository == ct->repository_level)) {
|
||||||
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
||||||
}
|
}
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
}
|
}
|
||||||
fprintf(fbsh,");\n");
|
fprintf(fbsh,");\n");
|
||||||
|
|
||||||
fprintf(fbsh,"warnings_list=(");
|
fprintf(fbsh,"warnings_list=(");
|
||||||
currheadersourcelist = ct->headersourcelist;
|
currheadersourcelist = ct->headersourcelist;
|
||||||
while (currheadersourcelist != NULL) {
|
while (currheadersourcelist != NULL) {
|
||||||
if ((currheadersourcelist->altrepository == ct->repository_level) &&
|
if ((currheadersourcelist->altrepository == ct->repository_level) &&
|
||||||
(printHTMLWarnings(fw,ct,currheadersourcelist,2) == 1)) {
|
(printHTMLWarnings(fw,ct,currheadersourcelist,2) == 1)) {
|
||||||
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
fprintf(fbsh,"%s ",currheadersourcelist->name);
|
||||||
}
|
}
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
}
|
}
|
||||||
fprintf(fbsh,");\n");
|
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) {
|
||||||
|
currchild = currheadersourcelist->firstchild[arch];
|
||||||
|
if (currchild) {
|
||||||
|
fprintf(fbsh,"[ \"$pkg\" = \"%s\" ] && { pkg_header=(%s %s %s %s \"%s\" \"%s\" %ld %ld %d %s); ",
|
||||||
|
currheadersourcelist->name,
|
||||||
|
currheadersourcelist->name,
|
||||||
|
currchild->arch,
|
||||||
|
currheadersourcelist->version,
|
||||||
|
currheadersourcelist->release,
|
||||||
|
currheadersourcelist->group,
|
||||||
|
currheadersourcelist->license,
|
||||||
|
currheadersourcelist->size,
|
||||||
|
currheadersourcelist->buildtime,
|
||||||
|
currheadersourcelist->altrepository,
|
||||||
|
ct->repository[currheadersourcelist->altrepository]->tag);
|
||||||
|
fprintf(fb,"%s:",
|
||||||
|
currheadersourcelist->name);
|
||||||
|
fprintf(fbsh,"pkg_builds=(");
|
||||||
|
|
||||||
currchild = currheadersourcelist->firstchild[arch];
|
obsoletebuf[0] = '\0';
|
||||||
|
|
||||||
if (currchild) {
|
while (currchild) {
|
||||||
|
fprintf(fbsh,"%s",currchild->name);
|
||||||
|
fprintf(fb," %s",currchild->name);
|
||||||
|
for (i = 0; i < currchild->obsoletecount; i++ ) {
|
||||||
|
if ((i > 0) && (!strcmp(currchild->obsoletename[i],currchild->obsoletename[i-1]))) continue;
|
||||||
|
if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= OBSOLETEBUF_SIZE - 2) {
|
||||||
|
logmsg(LOG_WARNING, "%s: reached obsoletebuf maximum size (%d); skipping further obsoletes in output file",
|
||||||
|
currheadersourcelist->name, OBSOLETEBUF_SIZE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (obsoletebuf[0] != '\0') strncat(obsoletebuf, " ", sizeof(obsoletebuf) - strlen(obsoletebuf));
|
||||||
|
strncat(obsoletebuf, currchild->obsoletename[i], sizeof(obsoletebuf) - strlen(obsoletebuf));
|
||||||
|
}
|
||||||
|
currchild = currchild->nextbrother;
|
||||||
|
if (currchild) fprintf(fbsh," ");
|
||||||
|
}
|
||||||
|
fprintf(fbsh,"); pkg_obsoletes=(%s);",obsoletebuf);
|
||||||
|
|
||||||
fprintf(fbsh,"[ \"$pkg\" = \"%s\" ] && { pkg_header=(%s %s %s %s \"%s\" \"%s\" %ld %ld %d %s); ",
|
/* find pointer to firstrebuild also looking into old packages */
|
||||||
currheadersourcelist->name,
|
currrebuild = currheadersourcelist->firstrebuild;
|
||||||
currheadersourcelist->name,
|
oldheadersourcelist = currheadersourcelist->old;
|
||||||
currchild->arch,
|
while (!currrebuild && oldheadersourcelist) {
|
||||||
currheadersourcelist->version,
|
currrebuild = oldheadersourcelist->firstrebuild;
|
||||||
currheadersourcelist->release,
|
oldheadersourcelist = oldheadersourcelist->old;
|
||||||
currheadersourcelist->group,
|
}
|
||||||
currheadersourcelist->license,
|
fprintf(fbsh," pkg_needrebuild=(");
|
||||||
currheadersourcelist->size,
|
while (currrebuild) {
|
||||||
currheadersourcelist->buildtime,
|
fprintf(fbsh, "%s@%s ", currrebuild->sourceheader->name, currrebuild->provider->name);
|
||||||
currheadersourcelist->altrepository,
|
currrebuild = currrebuild->next;
|
||||||
ct->repository[currheadersourcelist->altrepository]->tag);
|
}
|
||||||
fprintf(fb,"%s:",
|
fprintf(fbsh,"); }\n");
|
||||||
currheadersourcelist->name);
|
fprintf(fb,"\n");
|
||||||
|
}
|
||||||
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(fbsh,"pkg_builds=(");
|
fclose(fd);
|
||||||
|
fclose(fv);
|
||||||
|
fclose(fbsh);
|
||||||
|
fclose(fb);
|
||||||
|
fclose(fs);
|
||||||
|
fclose(fw);
|
||||||
|
|
||||||
obsoletebuf[0] = '\0';
|
return 0;
|
||||||
|
|
||||||
while (currchild) {
|
|
||||||
fprintf(fbsh,"%s",currchild->name);
|
|
||||||
fprintf(fb," %s",currchild->name);
|
|
||||||
for (i = 0; i < currchild->obsoletecount; i++ ) {
|
|
||||||
if ((i > 0) && (!strcmp(currchild->obsoletename[i],currchild->obsoletename[i-1]))) continue;
|
|
||||||
if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= OBSOLETEBUF_SIZE - 2) {
|
|
||||||
logmsg(LOG_WARNING, "%s: reached obsoletebuf maximum size (%d); skipping further obsoletes in output file",
|
|
||||||
currheadersourcelist->name, OBSOLETEBUF_SIZE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (obsoletebuf[0] != '\0') strncat(obsoletebuf, " ", sizeof(obsoletebuf) - strlen(obsoletebuf));
|
|
||||||
strncat(obsoletebuf, currchild->obsoletename[i], sizeof(obsoletebuf) - strlen(obsoletebuf));
|
|
||||||
}
|
|
||||||
currchild = currchild->nextbrother;
|
|
||||||
if (currchild) fprintf(fbsh," ");
|
|
||||||
}
|
|
||||||
fprintf(fbsh,"); pkg_obsoletes=(%s);",obsoletebuf);
|
|
||||||
|
|
||||||
/* find pointer to firstrebuild also looking into old packages */
|
|
||||||
currrebuild = currheadersourcelist->firstrebuild;
|
|
||||||
oldheadersourcelist = currheadersourcelist->old;
|
|
||||||
while (!currrebuild && oldheadersourcelist) {
|
|
||||||
currrebuild = oldheadersourcelist->firstrebuild;
|
|
||||||
oldheadersourcelist = oldheadersourcelist->old;
|
|
||||||
}
|
|
||||||
fprintf(fbsh," pkg_needrebuild=(");
|
|
||||||
while (currrebuild) {
|
|
||||||
fprintf(fbsh, "%s@%s ", currrebuild->sourceheader->name, currrebuild->provider->name);
|
|
||||||
currrebuild = currrebuild->next;
|
|
||||||
}
|
|
||||||
fprintf(fbsh,"); }\n");
|
|
||||||
fprintf(fb,"\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(fd);
|
|
||||||
fclose(fv);
|
|
||||||
fclose(fbsh);
|
|
||||||
fclose(fb);
|
|
||||||
fclose(fs);
|
|
||||||
fclose(fw);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user