From 7229926c020710a198bdf7b64ce28177ebd4f548 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 19 Jun 2025 20:01:50 -0400 Subject: [PATCH] bootc-base-imagectl: support `--install` packages with spaces Those are more like package requests than package names, so things like `foo > 1.0` should be supported. Pass the install arguments through `shlex.quote`. --- bootc-base-imagectl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootc-base-imagectl b/bootc-base-imagectl index 6fe863b..84e49df 100755 --- a/bootc-base-imagectl +++ b/bootc-base-imagectl @@ -4,6 +4,7 @@ import argparse import json import os import os.path as path +import shlex import shutil import stat import subprocess @@ -29,7 +30,7 @@ def run_build_rootfs(args): override_manifest = {} tmp_ostree_repo = None if args.install: - additional_pkgs = set(args.install) + additional_pkgs = [shlex.quote(p) for p in set(args.install)] if len(additional_pkgs) > 0: override_manifest['packages'] = list(additional_pkgs) if args.add_dir: