Get it building in a rootless container

This commit is contained in:
Kovid Goyal
2024-08-12 19:24:48 +05:30
parent 6ff943c10f
commit b872bbff49
2 changed files with 3 additions and 2 deletions

View File

@@ -201,9 +201,9 @@ def create_tarfile(env, compression_level='9'):
try:
shutil.rmtree(base)
except OSError as err:
if err.errno != errno.ENOENT:
if err.errno not in (errno.ENOENT, errno.EBUSY): # EBUSY when the directory is mountpoint
raise
os.mkdir(base)
os.makedirs(base, exist_ok=True)
dist = os.path.join(base, f'{kitty_constants["appname"]}-{kitty_constants["version"]}-{arch}.tar')
with tarfile.open(dist, mode='w', format=tarfile.PAX_FORMAT) as tf:
cwd = os.getcwd()