store: use default size in image build

If a user creates a compose with a size of 0, the default image size for
the image type should be used. Also, certain image types have
requirements for the image size. In order to ensure that the proper image
size is stored in the compose object, the compose's ImageBuild object
uses ImageType.Size() to get the correct image size for the image type.
This commit is contained in:
Jacob Kozol 2020-04-08 23:19:59 +02:00 committed by jkozol
parent d702760182
commit 105124dd25

View file

@ -538,7 +538,7 @@ func (s *Store) PushCompose(imageType distro.ImageType, bp *blueprint.Blueprint,
ImageType: imageTypeCommon,
Targets: targets,
JobCreated: time.Now(),
Size: size,
Size: imageType.Size(size),
},
},
}