store: don't query the distro for the filename

The LocalTarget contains the filename, so look it up there instead.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-03-22 18:28:04 +01:00
parent 839b22026e
commit 0656fdcd38
2 changed files with 11 additions and 43 deletions

View file

@ -60,14 +60,15 @@ func (ib *ImageBuild) DeepCopy() ImageBuild {
}
}
func (ib *ImageBuild) HasLocalTarget() bool {
func (ib *ImageBuild) GetLocalTargetOptions() *target.LocalTargetOptions {
for _, t := range ib.Targets {
if _, ok := t.Options.(*target.LocalTargetOptions); ok {
return true
switch options := t.Options.(type) {
case *target.LocalTargetOptions:
return options
}
}
return false
return nil
}
// A Compose represent the task of building a set of images from a single blueprint.