cmd/mbf: move gentoo bootstrap path
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 3m24s
Test / Sandbox (race detector) (push) Successful in 6m43s
Test / Hakurei (race detector) (push) Successful in 8m2s
Test / ShareFS (push) Successful in 8m10s
Test / Hakurei (push) Successful in 3m22s
Test / Flake checks (push) Successful in 1m18s
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 3m24s
Test / Sandbox (race detector) (push) Successful in 6m43s
Test / Hakurei (race detector) (push) Successful in 8m2s
Test / ShareFS (push) Successful in 8m10s
Test / Hakurei (push) Successful in 3m22s
Test / Flake checks (push) Successful in 1m18s
This is a lot more flexible for troubleshooting when used with the cure command. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+27
-29
@@ -615,27 +615,10 @@ func main() {
|
||||
)
|
||||
|
||||
{
|
||||
var (
|
||||
flagGentoo string
|
||||
flagChecksum string
|
||||
)
|
||||
c.NewCommand(
|
||||
"stage3",
|
||||
"Check for toolchain 3-stage non-determinism",
|
||||
func(args []string) (err error) {
|
||||
s := rosa.Std
|
||||
if flagGentoo != "" {
|
||||
s -= 3 // magic number to discourage misuse
|
||||
|
||||
var checksum pkg.Checksum
|
||||
if len(flagChecksum) != 0 {
|
||||
if err = pkg.Decode(&checksum, flagChecksum); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
rosa.Native().SetGentooStage3(flagGentoo, checksum)
|
||||
}
|
||||
|
||||
var (
|
||||
pathname *check.Absolute
|
||||
checksum [2]unique.Handle[pkg.Checksum]
|
||||
@@ -643,7 +626,7 @@ func main() {
|
||||
|
||||
_llvm := rosa.H("llvm")
|
||||
if err = cm.Do(func(cache *pkg.Cache) (err error) {
|
||||
_, llvm := rosa.Native().New(s - 2).Load(_llvm)
|
||||
_, llvm := rosa.Native().New(rosa.Std - 2).Load(_llvm)
|
||||
pathname, _, err = cache.Cure(llvm)
|
||||
return
|
||||
}); err != nil {
|
||||
@@ -652,7 +635,7 @@ func main() {
|
||||
log.Println("stage1:", pathname)
|
||||
|
||||
if err = cm.Do(func(cache *pkg.Cache) (err error) {
|
||||
_, llvm := rosa.Native().New(s - 1).Load(_llvm)
|
||||
_, llvm := rosa.Native().New(rosa.Std - 1).Load(_llvm)
|
||||
pathname, checksum[0], err = cache.Cure(llvm)
|
||||
return
|
||||
}); err != nil {
|
||||
@@ -660,7 +643,7 @@ func main() {
|
||||
}
|
||||
log.Println("stage2:", pathname)
|
||||
if err = cm.Do(func(cache *pkg.Cache) (err error) {
|
||||
_, llvm := rosa.Native().New(s).Load(_llvm)
|
||||
_, llvm := rosa.Native().New(rosa.Std).Load(_llvm)
|
||||
pathname, checksum[1], err = cache.Cure(llvm)
|
||||
return
|
||||
}); err != nil {
|
||||
@@ -681,14 +664,6 @@ func main() {
|
||||
}
|
||||
return
|
||||
},
|
||||
).Flag(
|
||||
&flagGentoo,
|
||||
"gentoo", command.StringFlag(""),
|
||||
"Bootstrap from a Gentoo stage3 tarball",
|
||||
).Flag(
|
||||
&flagChecksum,
|
||||
"checksum", command.StringFlag(""),
|
||||
"Checksum of Gentoo stage3 tarball",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -705,6 +680,9 @@ func main() {
|
||||
|
||||
flagBoot bool
|
||||
flagStd bool
|
||||
|
||||
flagGentoo string
|
||||
flagChecksum string
|
||||
)
|
||||
c.NewCommand(
|
||||
"cure",
|
||||
@@ -721,6 +699,18 @@ func main() {
|
||||
t -= 1
|
||||
}
|
||||
|
||||
if flagGentoo != "" {
|
||||
var checksum pkg.Checksum
|
||||
if len(flagChecksum) != 0 {
|
||||
if err := pkg.Decode(&checksum, flagChecksum); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
rosa.Native().SetGentooStage3(flagGentoo, checksum)
|
||||
|
||||
t -= 3 // magic number to discourage misuse
|
||||
}
|
||||
|
||||
_, a := rosa.Native().New(t).Load(rosa.ArtifactH(unique.Make(args[0])))
|
||||
if a == nil {
|
||||
return fmt.Errorf("unknown artifact %q", args[0])
|
||||
@@ -789,7 +779,7 @@ func main() {
|
||||
ctx,
|
||||
a,
|
||||
"", true, os.Stdin, os.Stdout, os.Stderr,
|
||||
rosa.AbsSystem.Append("bin", "mksh"),
|
||||
rosa.AbsSystem.Append("bin", "sh"),
|
||||
"sh",
|
||||
)
|
||||
})
|
||||
@@ -899,6 +889,14 @@ func main() {
|
||||
&flagRebuild,
|
||||
"rebuild", command.BoolFlag(false),
|
||||
"Always enter the artifact implementation",
|
||||
).Flag(
|
||||
&flagGentoo,
|
||||
"gentoo", command.StringFlag(""),
|
||||
"Bootstrap from a Gentoo stage3 tarball",
|
||||
).Flag(
|
||||
&flagChecksum,
|
||||
"checksum", command.StringFlag(""),
|
||||
"Checksum of Gentoo stage3 tarball",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user