diff --git a/internal/osbuild/stage.go b/internal/osbuild/stage.go index 0051c9d7e..f39331aab 100644 --- a/internal/osbuild/stage.go +++ b/internal/osbuild/stage.go @@ -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) +}