From 69173472194240d866b9a98964f49d25b7b73a2d Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Fri, 6 May 2022 05:27:08 +0200 Subject: [PATCH] chroot: fix rsync --exclude (use CHROOT_PATHS.values instead of implict keys()) --- chroot/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chroot/build.py b/chroot/build.py index c91b87a..21f3b9f 100644 --- a/chroot/build.py +++ b/chroot/build.py @@ -25,9 +25,11 @@ class BuildChroot(Chroot): base_chroot.initialize() logging.info(f'Copying {base_chroot.name} chroot to {self.name}') cmd = ['rsync', '-a', '--delete', '-q', '-W', '-x'] - for mountpoint in CHROOT_PATHS: + for mountpoint in CHROOT_PATHS.values(): cmd += ['--exclude', mountpoint.rstrip('/')] - result = subprocess.run(cmd + [f'{base_chroot.path}/', f'{self.path}/']) + cmd += [f'{base_chroot.path}/', f'{self.path}/'] + logging.debug(f"running rsync: {cmd}") + result = subprocess.run(cmd) if result.returncode != 0: raise Exception(f'Failed to copy {base_chroot.name} to {self.name}')