From: Cornelius Hoffmann Date: Wed, 24 May 2023 22:24:41 +0000 (+0200) Subject: fix missing exist_ok for debian /usr X-Git-Tag: v15~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49e60f3ca330ee1c977bbf51b712a680ec78d079;p=thirdparty%2Fmkosi.git fix missing exist_ok for debian /usr This would prevent having /usr in a skeleton tree --- diff --git a/mkosi/distributions/debian.py b/mkosi/distributions/debian.py index 40a053c29..eedabec69 100644 --- a/mkosi/distributions/debian.py +++ b/mkosi/distributions/debian.py @@ -70,10 +70,10 @@ class DebianInstaller(DistributionInstaller): "x32" : ["lib32", "lib64", "libx32"], }.get(DEBIAN_ARCHITECTURES[state.config.architecture], []) - state.root.joinpath("usr").mkdir(mode=0o755) + state.root.joinpath("usr").mkdir(mode=0o755, exist_ok=True) for d in subdirs: state.root.joinpath(d).symlink_to(f"usr/{d}") - state.root.joinpath(f"usr/{d}").mkdir(mode=0o755) + state.root.joinpath(f"usr/{d}").mkdir(mode=0o755, exist_ok=True) # Next, we invoke apt-get install to download all the essential packages. With DPkg::Pre-Install-Pkgs, # we specify a shell command that will receive the list of packages that will be installed on stdin.