From c2ff52a7cf18e7efc510c94f56074fbd655bc609 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 17 Jun 2025 14:57:25 -0400 Subject: [PATCH] bootc-base-imagectl: simplify manifest path logic The `if os.path.isdir(args.manifest)` bit dates from the introduction of this script, but doesn't really work. I suspect the intent here was to abstract over some manifests being top-level YAML files and others being directories). Except that: 1. The script didn't actually check the right path. It's checking `$PWD/{args.manifest}` instead of `$MANIFESTDIR/{args.manifest}`. 2. `list` doesn't have the equivalent logic to look for `manifest.yaml` files in subdirectories. 3. Nowadays, there is both a e.g. `standard.yaml` _and_ a `standard/manifest.yaml` directory. The established semantic there AIUI is that the top-level manifests are opinionated for a specific OS (Fedora/CentOS/RHEL), whereas the directories are shared across all of those. So let's just nuke support for the directory path. --- bootc-base-imagectl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bootc-base-imagectl b/bootc-base-imagectl index fbe879a..f2dffae 100755 --- a/bootc-base-imagectl +++ b/bootc-base-imagectl @@ -17,10 +17,7 @@ def run_build_rootfs(args): Regenerates a base image using a build configuration. """ target = args.target - if os.path.isdir(args.manifest): - manifest_path = os.path.join(f'/{MANIFESTDIR}', args.manifest, 'manifest.yaml') - else: - manifest_path = f'/{MANIFESTDIR}/{args.manifest}.yaml' + manifest_path = f'/{MANIFESTDIR}/{args.manifest}.yaml' rpmostree_argv = ['rpm-ostree', 'compose', 'rootfs']