diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-13 10:41:22 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-13 10:41:22 +0900 |
| commit | 96d382f8054eede233eb34e53660c9ff323534db (patch) | |
| tree | 216aad7fc2cfd0e372af35ef02c2ce2508f8b1a2 | |
| parent | 5c785c135cc6c9e0f478b58d6d30499680808f25 (diff) | |
cmd/mbf: resolve runtime dependencies
This also adds the collection meta-artifact for concurrent curing.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | cmd/mbf/main.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index 1a03757a..62588a3f 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -477,17 +477,19 @@ func main() { "shell", "Interactive shell in the specified Rosa OS environment", func(args []string) error { - root := make([]pkg.Artifact, 0, 6+len(args)) - for _, arg := range args { + presets := make([]rosa.PArtifact, len(args)) + for i, arg := range args { p, ok := rosa.ResolveName(arg) if !ok { return fmt.Errorf("unknown artifact %q", arg) } - root = append(root, rosa.Std.Load(p)) + presets[i] = p } + root := make(rosa.Collect, 0, 6+len(args)) + root = rosa.Std.AppendPresets(root, presets...) if flagWithToolchain { - musl, compilerRT, runtimes, clang := rosa.Std.NewLLVM() + musl, compilerRT, runtimes, clang := (rosa.Std - 1).NewLLVM() root = append(root, musl, compilerRT, runtimes, clang) } else { root = append(root, rosa.Std.Load(rosa.Musl)) @@ -497,6 +499,12 @@ func main() { rosa.Std.Load(rosa.Toybox), ) + if _, _, err := cache.Cure(&root); err == nil { + return errors.New("unreachable") + } else if !errors.Is(err, rosa.Collected{}) { + return err + } + type cureRes struct { pathname *check.Absolute checksum unique.Handle[pkg.Checksum] |
