distromatic.c: add date field to sources file

This commit is contained in:
Silvan Calarco 2021-04-04 15:11:03 +02:00
parent a1f6116577
commit 5136ee98b9

View File

@ -1268,6 +1268,8 @@ main(int argc, char *argv[])
// write list of left packages (not required by any other package)
char allsources_filename[PATH_MAX];
FILE *afs;
long tot;
humanDate strdate;
snprintf(allsources_filename, PATH_MAX, "%ssources", configtag->html_dir);
afs=fopen(allsources_filename,"w");
if (!afs) {
@ -1275,8 +1277,7 @@ main(int argc, char *argv[])
exit(1);
}
currheadersourcelist = configtag->headersourcelist;
long tot;
fprintf(afs,"# Number of times each source and related builds are internally required\n# src");
fprintf(afs,"# Number of times each source and related builds are internally required\n# src date");
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
tot += currheadersourcelist->childrenrequiredcount[i];
fprintf(afs," %s", configtag->arch[i]);
@ -1285,6 +1286,8 @@ main(int argc, char *argv[])
while (currheadersourcelist != NULL) {
tot = 0;
fprintf(afs,"%s:", currheadersourcelist->name);
fprintf(afs," %s", (char *)simpleTimeToTemplate(
currheadersourcelist->buildtime,"%Y%m%d",&strdate));
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
tot += currheadersourcelist->childrenrequiredcount[i];
if (currheadersourcelist->firstchild[i])