hst/fsbind: optional autoetc behaviour
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m18s
Test / Hpkg (push) Successful in 4m9s
Test / Sandbox (race detector) (push) Successful in 4m31s
Test / Hakurei (race detector) (push) Successful in 5m6s
Test / Hakurei (push) Successful in 2m24s
Test / Flake checks (push) Successful in 1m29s

This generalises the special field allowing any special behaviour to be matched from target.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-25 18:30:40 +09:00
parent 1438096339
commit 6d202d73b4
10 changed files with 107 additions and 53 deletions

View File

@@ -62,15 +62,15 @@ func (o *FSOverlay) Host() []*container.Absolute {
return p
}
func (o *FSOverlay) Apply(op *container.Ops) {
func (o *FSOverlay) Apply(z *ApplyState) {
if !o.Valid() {
return
}
if o.Upper != nil && o.Work != nil { // rw
op.Overlay(o.Target, o.Upper, o.Work, o.Lower...)
z.Overlay(o.Target, o.Upper, o.Work, o.Lower...)
} else { // ro
op.OverlayReadonly(o.Target, o.Lower...)
z.OverlayReadonly(o.Target, o.Lower...)
}
}