osbuild: add mount ostree helper method to Stage

A convenience method that adds an ostree deployment mount to any Stage.
This commit is contained in:
Achilleas Koutsou 2022-08-22 12:59:27 +02:00 committed by Tom Gundersen
parent 4a68df45c7
commit 0ff1c3241c

View file

@ -17,3 +17,11 @@ type Stage struct {
type StageOptions interface {
isStageOptions()
}
// MountOSTree adds an ostree mount to a stage which makes it run in a deployed
// ostree stateroot.
func (s *Stage) MountOSTree(osName, ref string, serial int) {
name := "ostree-" + ref
ostreeMount := NewOSTreeDeploymentMount(name, osName, ref, serial)
s.Mounts = append(s.Mounts, *ostreeMount)
}