mirror of
https://gitlab.com/fedora/bootc/base-images.git
synced 2026-09-02 14:30:46 +00:00
bootc-base-imagectl: error when --add-dir dir is missing
This was silently not failing and should be considered a hard failure. Also add log statement for help debugging something like this.
This commit is contained in:
parent
e881766b13
commit
5ecaa00668
1 changed files with 3 additions and 0 deletions
|
|
@ -48,8 +48,11 @@ def run_build_rootfs(args):
|
|||
override_manifest['ostree-override-layers'] = []
|
||||
|
||||
for dir in args.add_dir:
|
||||
print(f"Processing --add-dir for {dir}")
|
||||
base = os.path.basename(dir)
|
||||
abs = os.path.realpath(dir)
|
||||
if not os.path.exists(abs):
|
||||
raise Exception(f"add dir directory not found: {abs}")
|
||||
# capture output to hide commit digest printed
|
||||
subprocess.check_output(['ostree', 'commit', '--repo', tmp_ostree_repo, '-b', f'overlay/{base}', abs,
|
||||
'--owner-uid=0', '--owner-gid=0', '--no-xattrs', '--mode-ro-executables'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue