From b4ded6141fb219cd4f3188e887168210a96a8fb3 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mar 12 2024 16:40:41 +0000 Subject: kiwi: rename 'vhdfixed' images to 'vhd' Kiwi's "vhd-fixed" format, which we use to generate Azure images, outputs images with the extension "vhdfixed.xz". This isn't in Koji's list of accepted image extensions, and updating that involves a database schema update, which is a drag. It seems easier to just rename these images to "vhd.xz" when uploading them. Signed-off-by: Adam Williamson --- diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py index e1c7a0a..a4edda0 100644 --- a/plugins/builder/kiwi.py +++ b/plugins/builder/kiwi.py @@ -423,7 +423,10 @@ class KiwiCreateImageTask(BaseBuildTask): bundle_path = os.path.join(broot.rootdir(), bundle_dir[1:]) for fname in os.listdir(bundle_path): - self.uploadFile(os.path.join(bundle_path, fname), remoteName=fname) + # rename '.vhdfixed.xz' Azure images to 'vhd.xz' to match + # what Koji expects + upname = fname.replace("vhdfixed", "vhd") + self.uploadFile(os.path.join(bundle_path, fname), remoteName=upname) imgdata['files'].append(fname) if not self.opts.get('scratch'):