diff options
author | tnn <tnn@pkgsrc.org> | 2008-02-24 15:35:42 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2008-02-24 15:35:42 +0000 |
commit | 64460643cd254198b6a54d412059242633aa91db (patch) | |
tree | 5184942f660af1ef7faa64431672a415b87245aa /pkgtools | |
parent | 4522e41c2345abe5dace6ccfbf0d93744e3f00ab (diff) | |
download | pkgsrc-64460643cd254198b6a54d412059242633aa91db.tar.gz |
Improve verbose mode:
- sprinkle whitespace so pkgnames get neatly aligned
- prepend a progress counter to printfs
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pbulk/files/pbulk/pbuild/jobs.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgtools/pbulk/files/pbulk/pbuild/jobs.c b/pkgtools/pbulk/files/pbulk/pbuild/jobs.c index 9e474aa36a5..f09c7ee4f0e 100644 --- a/pkgtools/pbulk/files/pbulk/pbuild/jobs.c +++ b/pkgtools/pbulk/files/pbulk/pbuild/jobs.c @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.c,v 1.7 2007/11/30 17:31:38 rillig Exp $ */ +/* $NetBSD: jobs.c,v 1.8 2008/02/24 15:35:42 tnn Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -71,6 +71,7 @@ ts_printf(const char *fmt, ...) time_t now; va_list ap; char buf[512]; + struct build_stat st; if (verbosity >= 2) { now = time(NULL); @@ -81,6 +82,12 @@ ts_printf(const char *fmt, ...) (void)printf("%s ", buf); } + if (verbosity >= 1) { + build_stats(&st); + printf("[%lu/%lu] ", (unsigned long)len_jobs - st.open_jobs, + (unsigned long)len_jobs); + } + va_start(ap, fmt); (void)vprintf(fmt, ap); va_end(ap); @@ -432,7 +439,7 @@ process_job(struct build_job *job, enum job_state state, int log_state) free(buf); } if (verbosity >= 1) - ts_printf("Failed to build %s\n", job->pkgname); + ts_printf("Failed to build %s\n", job->pkgname); /* FALLTHROUGH */ case JOB_INDIRECT_FAILED: recursive_mark_broken(job, JOB_INDIRECT_FAILED); @@ -444,7 +451,7 @@ process_job(struct build_job *job, enum job_state state, int log_state) break; case JOB_IN_PROCESSING: if (verbosity >= 1) - ts_printf("Starting build of %s\n", job->pkgname); + ts_printf("Starting build of %s\n", job->pkgname); break; case JOB_OPEN: if (job->open_depends == 0) |