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
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:
+13
-6
@@ -17,13 +17,16 @@ func (t Toolchain) NewViaGit(
|
|||||||
url, rev string,
|
url, rev string,
|
||||||
checksum pkg.Checksum,
|
checksum pkg.Checksum,
|
||||||
) pkg.Artifact {
|
) pkg.Artifact {
|
||||||
return t.New(strings.TrimSuffix(
|
return t.NewPackage(strings.TrimSuffix(
|
||||||
path.Base(url),
|
path.Base(url),
|
||||||
".git",
|
".git",
|
||||||
)+"-src-"+path.Base(rev), THostNet, t.Append(nil,
|
)+"-src", path.Base(rev), nil, &PackageAttr{
|
||||||
_nssCACert,
|
KnownChecksum: &checksum,
|
||||||
_git,
|
|
||||||
), &checksum, nil, `
|
Flag: THostNet,
|
||||||
|
Paths: []pkg.ExecPath{resolvconf()},
|
||||||
|
}, &GenericHelper{
|
||||||
|
Build: `
|
||||||
git \
|
git \
|
||||||
-c advice.detachedHead=false \
|
-c advice.detachedHead=false \
|
||||||
clone \
|
clone \
|
||||||
@@ -34,5 +37,9 @@ git \
|
|||||||
` + url + ` \
|
` + url + ` \
|
||||||
/work
|
/work
|
||||||
rm -rf /work/.git
|
rm -rf /work/.git
|
||||||
`, resolvconf())
|
`,
|
||||||
|
},
|
||||||
|
_nssCACert,
|
||||||
|
_git,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,9 +363,14 @@ function apply {
|
|||||||
buf.WriteString("'\n")
|
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,
|
_patch,
|
||||||
), nil, nil, buf.String(), paths...)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// helperInPlace is a special directory value for omitting the cd statement.
|
// helperInPlace is a special directory value for omitting the cd statement.
|
||||||
|
|||||||
Reference in New Issue
Block a user