From f7f48d57e9260f4e076e47013318714a52527b2f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 15 Apr 2026 15:35:45 +0900 Subject: internal/pkg: pass impure job count This is cleaner than checking cpu count during cure, it is impossible to avoid impurity in both situations but this is configurable. Signed-off-by: Ophestra --- cmd/mbf/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index c79a61bf..a9d9a0c8 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -72,6 +72,7 @@ func main() { var ( flagQuiet bool flagCures int + flagJobs int flagBase string flagIdle bool @@ -99,7 +100,7 @@ func main() { if flagHostAbstract { flags |= pkg.CHostAbstract } - cache, err = pkg.Open(ctx, msg, flags, flagCures, base) + cache, err = pkg.Open(ctx, msg, flags, flagCures, flagJobs, base) return }).Flag( @@ -110,6 +111,10 @@ func main() { &flagCures, "cures", command.IntFlag(0), "Maximum number of dependencies to cure at any given time", + ).Flag( + &flagJobs, + "jobs", command.IntFlag(0), + "Preferred number of jobs to run, when applicable", ).Flag( &flagBase, "d", command.StringFlag("$MBF_CACHE_DIR"), -- cgit v1.3.1