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`.
This commit is contained in:
Jonathan Lebon 2025-06-19 20:01:50 -04:00
parent 72209c6c1c
commit 7229926c02
No known key found for this signature in database

View file

@ -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: