Tolerate externals/distfiles already existing (needed for CI)

This commit is contained in:
Gábor Stefanik 2023-12-25 19:27:11 +01:00 committed by fosslinux
parent 896c618bd1
commit f67c7d1144
1 changed files with 2 additions and 2 deletions

View File

@ -174,11 +174,11 @@ class Generator():
main_distfile_dir = os.path.join(self.external_dir, 'distfiles')
if early_distfile_dir != main_distfile_dir:
os.makedirs(early_distfile_dir)
os.makedirs(early_distfile_dir, exist_ok=True)
copy_no_network_distfiles(early_distfile_dir)
if self.external_sources:
shutil.copytree(self.distfiles_dir, main_distfile_dir)
shutil.copytree(self.distfiles_dir, main_distfile_dir, dirs_exist_ok=True)
else:
os.mkdir(main_distfile_dir)
copy_no_network_distfiles(main_distfile_dir)