xbps-fbulk: split results into 4 categories: good, bad, skipped, deps.
- good (built successfully) - bad (build failed) - skipped (build skipped due to broken/only_for_archs) - deps (build skipped due to dependencies)
This commit is contained in:
parent
9393054423
commit
4b608365e0
@ -190,7 +190,7 @@ processCompletion(struct item *item)
|
|||||||
if (item->status == XRUN) {
|
if (item->status == XRUN) {
|
||||||
logpath1 = xbps_xasprintf("%s/run/%s", LogDir, item->pkgn);
|
logpath1 = xbps_xasprintf("%s/run/%s", LogDir, item->pkgn);
|
||||||
logpath2 = xbps_xasprintf("%s/%s/%s", LogDir,
|
logpath2 = xbps_xasprintf("%s/%s/%s", LogDir,
|
||||||
(item->xcode ? "bad" : "good"), item->pkgn);
|
item->xcode ? "bad" : "good" , item->pkgn);
|
||||||
rename(logpath1, logpath2);
|
rename(logpath1, logpath2);
|
||||||
free(logpath1);
|
free(logpath1);
|
||||||
free(logpath2);
|
free(logpath2);
|
||||||
@ -198,10 +198,10 @@ processCompletion(struct item *item)
|
|||||||
/*
|
/*
|
||||||
* If XBROKEN, "xbps-src show-build-deps" returned an error, perhaps
|
* If XBROKEN, "xbps-src show-build-deps" returned an error, perhaps
|
||||||
* because the pkg is currently broken or cannot be packaged for the
|
* because the pkg is currently broken or cannot be packaged for the
|
||||||
* target architecture, just set it as broken.
|
* target architecture, just set it as skipped.
|
||||||
*/
|
*/
|
||||||
if (item->status == XBROKEN) {
|
if (item->status == XBROKEN) {
|
||||||
logpath1 = xbps_xasprintf("%s/bad/%s", LogDir, item->pkgn);
|
logpath1 = xbps_xasprintf("%s/skipped/%s", LogDir, item->pkgn);
|
||||||
fp = fopen(logpath1, "a");
|
fp = fopen(logpath1, "a");
|
||||||
fprintf(fp, "%s", item->emsg);
|
fprintf(fp, "%s", item->emsg);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@ -226,7 +226,7 @@ processCompletion(struct item *item)
|
|||||||
if (item->xcode) {
|
if (item->xcode) {
|
||||||
xitem->xcode = item->xcode;
|
xitem->xcode = item->xcode;
|
||||||
xitem->status = XDEPFAIL;
|
xitem->status = XDEPFAIL;
|
||||||
logpath3 = xbps_xasprintf("%s/bad/%s", LogDir, xitem->pkgn);
|
logpath3 = xbps_xasprintf("%s/deps/%s", LogDir, xitem->pkgn);
|
||||||
fp = fopen(logpath3, "a");
|
fp = fopen(logpath3, "a");
|
||||||
fprintf(fp, "Dependency failed: %s\n", item->pkgn);
|
fprintf(fp, "Dependency failed: %s\n", item->pkgn);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@ -246,7 +246,7 @@ processCompletion(struct item *item)
|
|||||||
* Add this dependency failure to its log file
|
* Add this dependency failure to its log file
|
||||||
* (which has already been renamed).
|
* (which has already been renamed).
|
||||||
*/
|
*/
|
||||||
logpath3 = xbps_xasprintf("%s/bad/%s", LogDir, xitem->pkgn);
|
logpath3 = xbps_xasprintf("%s/deps/%s", LogDir, xitem->pkgn);
|
||||||
fp = fopen(logpath3, "a");
|
fp = fopen(logpath3, "a");
|
||||||
fprintf(fp, "Dependency failed: %s\n", item->pkgn);
|
fprintf(fp, "Dependency failed: %s\n", item->pkgn);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@ -427,7 +427,7 @@ addDepn(struct item *item, struct item *xitem)
|
|||||||
item->status == XDEPFAIL);
|
item->status == XDEPFAIL);
|
||||||
item->xcode = xitem->xcode;
|
item->xcode = xitem->xcode;
|
||||||
item->status = XDEPFAIL;
|
item->status = XDEPFAIL;
|
||||||
logpath3 = xbps_xasprintf("%s/bad/%s", LogDir, item->pkgn);
|
logpath3 = xbps_xasprintf("%s/deps/%s", LogDir, item->pkgn);
|
||||||
fp = fopen(logpath3, "a");
|
fp = fopen(logpath3, "a");
|
||||||
fprintf(fp, "Dependency failed: %s\n", xitem->pkgn);
|
fprintf(fp, "Dependency failed: %s\n", xitem->pkgn);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
@ -635,19 +635,31 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
tmp = xbps_xasprintf("%s/run", LogDir);
|
tmp = xbps_xasprintf("%s/run", LogDir);
|
||||||
if (xbps_mkpath(tmp, 0755) != 0) {
|
if (xbps_mkpath(tmp, 0755) != 0) {
|
||||||
fprintf(stderr, "ERROR: failed to create RunLogDir %s: %s\n", tmp, strerror(errno));
|
fprintf(stderr, "ERROR: failed to create run LogDir %s: %s\n", tmp, strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
free(tmp);
|
free(tmp);
|
||||||
tmp = xbps_xasprintf("%s/good", LogDir);
|
tmp = xbps_xasprintf("%s/good", LogDir);
|
||||||
if (xbps_mkpath(tmp, 0755) != 0) {
|
if (xbps_mkpath(tmp, 0755) != 0) {
|
||||||
fprintf(stderr, "ERROR: failed to create GoodLogDir %s: %s\n", tmp, strerror(errno));
|
fprintf(stderr, "ERROR: failed to create good LogDir %s: %s\n", tmp, strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
free(tmp);
|
free(tmp);
|
||||||
tmp = xbps_xasprintf("%s/bad", LogDir);
|
tmp = xbps_xasprintf("%s/bad", LogDir);
|
||||||
if (xbps_mkpath(tmp, 0755) != 0) {
|
if (xbps_mkpath(tmp, 0755) != 0) {
|
||||||
fprintf(stderr, "ERROR: failed to create BadLogDir %s: %s\n", tmp, strerror(errno));
|
fprintf(stderr, "ERROR: failed to create bad LogDir %s: %s\n", tmp, strerror(errno));
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
free(tmp);
|
||||||
|
tmp = xbps_xasprintf("%s/skipped", LogDir);
|
||||||
|
if (xbps_mkpath(tmp, 0755) != 0) {
|
||||||
|
fprintf(stderr, "ERROR: failed to create skipped LogDir %s: %s\n", tmp, strerror(errno));
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
free(tmp);
|
||||||
|
tmp = xbps_xasprintf("%s/deps", LogDir);
|
||||||
|
if (xbps_mkpath(tmp, 0755) != 0) {
|
||||||
|
fprintf(stderr, "ERROR: failed to create deps LogDir %s: %s\n", tmp, strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user