imagectl: Copy symlinks as symlinks for manifests

This fixes using `defaults.yaml` as a link, which we don't
want to list with the `list` verb.
This commit is contained in:
Colin Walters 2025-02-27 19:52:27 -05:00
parent d8e5834ce9
commit 3f39d107e1

View file

@ -48,7 +48,7 @@ def run_build_rootfs(args):
for d in [MANIFESTDIR]:
dst = path.join(target, d)
print(f"Copying /{d} to {dst}")
shutil.copytree('/' + d, dst)
shutil.copytree('/' + d, dst, symlinks=True)
for f in ['usr/libexec/bootc-base-imagectl']:
dst = path.join(target, f)
print(f"Copying /{f} to {dst}")