distro.Manifest: take Customizations rather than Blueprint as argument

This makes two changes simultaneously, to avoid too much churn:
 - move accessors from being on the blueprint struct to the
   customizations struct, and
 - pass the customizations struct rather than the whole blueprint
   as argumnet to distro.Manifest().

@larskarlitski pointed out in a previous review that it feels
redundant to pass the whole blueprint as well as the list of
packages to the Manifest funciton. Indeed it is, so this
simplifies things a bit.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-03-15 22:59:54 +01:00
parent 5d179428be
commit 7957feff48
13 changed files with 172 additions and 172 deletions

View file

@ -139,7 +139,7 @@ func main() {
}
} else {
size := d.GetSizeForOutputType(imageType, 0)
manifest, err := d.Manifest(blueprint, nil, packageSpecs, buildPackageSpecs, archArg, imageType, size)
manifest, err := d.Manifest(blueprint.Customizations, nil, packageSpecs, buildPackageSpecs, archArg, imageType, size)
if err != nil {
panic(err.Error())
}