aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-05 21:33:27 +0900
committerOphestra <cat@gensokyo.uk>2026-05-05 23:56:16 +0900
commit15cdb37ec29056890a44f5a5b22f4917b81c5781 (patch)
tree9571c8c57017467f12ef08e8e75811783e49c556 /cmd
parent1f0bdc7aca5a20b8b76bbc903f78e51af648e42c (diff)
cmd/mbf: optional init verbosity
This output is generally not needed and only useful when debugging container machinery itself. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mbf/cache.go4
-rw-r--r--cmd/mbf/main.go5
2 files changed, 9 insertions, 0 deletions
diff --git a/cmd/mbf/cache.go b/cmd/mbf/cache.go
index 5c89ca10..05fa7070 100644
--- a/cmd/mbf/cache.go
+++ b/cmd/mbf/cache.go
@@ -21,6 +21,7 @@ type cache struct {
cures, jobs int
hostAbstract, idle bool
+ verboseInit bool
base string
}
@@ -45,6 +46,9 @@ func (cache *cache) open() (err error) {
if cache.hostAbstract {
flags |= pkg.CHostAbstract
}
+ if !cache.verboseInit {
+ flags |= pkg.CSuppressInit
+ }
done := make(chan struct{})
defer close(done)
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 44dd7b32..030d9325 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -109,6 +109,10 @@ func main() {
"check", command.BoolFlag(true),
"Run test suites",
).Flag(
+ &cm.verboseInit,
+ "v", command.BoolFlag(false),
+ "Do not suppress verbose output from init",
+ ).Flag(
&cm.cures,
"cures", command.IntFlag(0),
"Maximum number of dependencies to cure at any given time",
@@ -710,6 +714,7 @@ func main() {
z.Hostname = "localhost"
z.Uid, z.Gid = (1<<10)-1, (1<<10)-1
z.Stdin, z.Stdout, z.Stderr = os.Stdin, os.Stdout, os.Stderr
+ z.Quiet = !cm.verboseInit
if s, ok := os.LookupEnv("TERM"); ok {
z.Env = append(z.Env, "TERM="+s)
}