distro/fedora: return OSTreeRawImage from iotRawImage

Some basic information and ostree options copied to image.

Co-Authored-By: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Achilleas Koutsou 2022-08-15 22:23:10 +02:00 committed by Tom Gundersen
parent 5d61ba5d39
commit 526ea0541c

View file

@ -280,5 +280,27 @@ func iotRawImage(workload workload.Workload,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
rng *rand.Rand) (image.ImageKind, error) {
return nil, nil
img := image.NewOSTreeRawImage()
img.Platform = t.platform
img.Workload = workload
img.Remote = "fedora-iot"
img.OSName = "fedora-iot"
img.OSTreeURL = options.OSTree.URL
img.OSTreeRef = options.OSTree.Ref
img.OSTreeCommit = options.OSTree.Parent
// TODO: move generation into LiveImage
pt, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
if err != nil {
return nil, err
}
img.PartitionTable = pt
img.Filename = t.Filename()
return img, nil
}