internal/rosa: remove calls to low-level exec helper
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m54s
Test / Hakurei (push) Successful in 4m32s
Test / Sandbox (race detector) (push) Successful in 5m48s
Test / Hakurei (race detector) (push) Successful in 6m59s
Test / ShareFS (push) Successful in 7m29s
Test / Flake checks (push) Successful in 1m12s

This method predates the helper infrastructure, it is awkward to use and difficult to maintain for the replacement bootstrap mechanism. This change prepares for its removal.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-07-27 18:24:38 +09:00
parent bd0cc3656f
commit 95aa7c205c
2 changed files with 22 additions and 10 deletions
+15 -8
View File
@@ -17,22 +17,29 @@ func (t Toolchain) NewViaGit(
url, rev string,
checksum pkg.Checksum,
) pkg.Artifact {
return t.New(strings.TrimSuffix(
return t.NewPackage(strings.TrimSuffix(
path.Base(url),
".git",
)+"-src-"+path.Base(rev), THostNet, t.Append(nil,
_nssCACert,
_git,
), &checksum, nil, `
)+"-src", path.Base(rev), nil, &PackageAttr{
KnownChecksum: &checksum,
Flag: THostNet,
Paths: []pkg.ExecPath{resolvconf()},
}, &GenericHelper{
Build: `
git \
-c advice.detachedHead=false \
clone \
--depth=1 \
--revision=`+rev+` \
--revision=` + rev + ` \
--shallow-submodules \
--recurse-submodules \
`+url+` \
` + url + ` \
/work
rm -rf /work/.git
`, resolvconf())
`,
},
_nssCACert,
_git,
)
}
+7 -2
View File
@@ -363,9 +363,14 @@ function apply {
buf.WriteString("'\n")
}
}
return t.New(name+"-src", 0, t.Append(nil,
return t.NewPackage(name+"-src", Unversioned, nil, &PackageAttr{
Paths: paths,
}, &GenericHelper{
Build: buf.String(),
},
_patch,
), nil, nil, buf.String(), paths...)
)
}
// helperInPlace is a special directory value for omitting the cd statement.