internal/rosa/package: migrate system image
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m52s
Test / ShareFS (push) Successful in 3m43s
Test / Hakurei (push) Successful in 3m56s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m30s
Test / Flake checks (push) Successful in 1m22s
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m52s
Test / ShareFS (push) Successful in 3m43s
Test / Hakurei (push) Successful in 3m56s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m30s
Test / Flake checks (push) Successful in 1m22s
The overlay argument also enables migration of stage0. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+22
-7
@@ -932,6 +932,7 @@ func (ctx *evalContext) pf(
|
||||
output pkg.Artifact
|
||||
sourceA any
|
||||
helper Helper
|
||||
overlay string
|
||||
|
||||
inputs, runtimes, extra azalea.Array
|
||||
)
|
||||
@@ -960,6 +961,7 @@ func (ctx *evalContext) pf(
|
||||
k("inputs"): &inputs,
|
||||
k("runtime"): &runtimes,
|
||||
k("extra"): &extra,
|
||||
k("overlay"): &overlay,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
@@ -991,13 +993,26 @@ func (ctx *evalContext) pf(
|
||||
})
|
||||
}
|
||||
|
||||
for _, h := range extraH {
|
||||
_, a := ctx.t.MustLoad(h)
|
||||
attr.Paths = append(attr.Paths, pkg.Path(
|
||||
AbsUsrSrc.Append("extra", h.String()),
|
||||
attr.Writable,
|
||||
a,
|
||||
))
|
||||
if overlay == "" {
|
||||
for _, h := range extraH {
|
||||
_, a := ctx.t.MustLoad(h)
|
||||
attr.Paths = append(attr.Paths, pkg.Path(
|
||||
AbsUsrSrc.Append("extra", h.String()),
|
||||
attr.Writable,
|
||||
a,
|
||||
))
|
||||
}
|
||||
} else {
|
||||
var o pkg.ExecPath
|
||||
if o.P, err = check.NewAbs(overlay); err != nil {
|
||||
o.P = AbsUsrSrc.Append("extra", overlay)
|
||||
}
|
||||
o.A = make([]pkg.Artifact, len(extraH))
|
||||
for i, h := range extraH {
|
||||
_, a := ctx.t.MustLoad(h)
|
||||
o.A[i] = a
|
||||
}
|
||||
attr.Paths = append(attr.Paths, o)
|
||||
}
|
||||
|
||||
for _, pair := range files {
|
||||
|
||||
Reference in New Issue
Block a user