From 49c87afb33a60a5cc84ad883b39aa443af48587f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Mon, 23 Jun 2025 14:32:08 +0200 Subject: [PATCH] cmd/describe: fix describing of '*-simplified-installer' images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmd/image-builder/describeimg.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/image-builder/describeimg.go b/cmd/image-builder/describeimg.go index 2fad913..e41c181 100644 --- a/cmd/image-builder/describeimg.go +++ b/cmd/image-builder/describeimg.go @@ -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