chroot: fix rsync --exclude (use CHROOT_PATHS.values instead of implict keys())
This commit is contained in:
parent
3874b4e626
commit
6917347219
1 changed files with 4 additions and 2 deletions
|
@ -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}')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue