forked from rosa/hakurei
internal/rosa: remove calls to low-level exec helper
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,
|
||||
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 \
|
||||
@@ -34,5 +37,9 @@ git \
|
||||
` + url + ` \
|
||||
/work
|
||||
rm -rf /work/.git
|
||||
`, resolvconf())
|
||||
`,
|
||||
},
|
||||
_nssCACert,
|
||||
_git,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user