cmd/describe: fix describing of '*-simplified-installer' images
The '*-simplified-installer' images require the installation device to be specified as a BP customization to serialize their Manifest. The 'describe' command was not setting those, which resulted in errors when describing such image types. Set a dummy installation device BP customization for image types with their name ending with '-simplified-installer', to enable describing of such images. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
44ef682ca1
commit
49c87afb33
1 changed files with 9 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
|
|
@ -46,6 +47,14 @@ type packagesYAML struct {
|
|||
|
||||
func packageSetsFor(imgType distro.ImageType) (map[string]*packagesYAML, error) {
|
||||
var bp blueprint.Blueprint
|
||||
// XXX: '*-simplified-installer' images require the installation device to be specified as a BP customization.
|
||||
// Workaround this for now by setting a dummy device. We should ideally have a way to get image type pkg sets
|
||||
// without doing this.
|
||||
if strings.HasSuffix(imgType.Name(), "-simplified-installer") {
|
||||
bp.Customizations = &blueprint.Customizations{
|
||||
InstallationDevice: "/dev/dummy",
|
||||
}
|
||||
}
|
||||
|
||||
var imgOpts distro.ImageOptions
|
||||
// Mock ostree options for ostree-based images to make describe work
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue