]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Make sure we create /var/lib/dpkg with the right access mode
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 15 Apr 2023 18:12:59 +0000 (20:12 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 17 Apr 2023 09:27:33 +0000 (11:27 +0200)
mkosi/distributions/debian.py

index a3b00b9d19af4905199c4c9405730fc89afcdfec..9c33ddece775275473a58f0d1c32e8513bec6f7b 100644 (file)
@@ -160,7 +160,9 @@ def invoke_apt(
 
     state.workspace.joinpath("apt").mkdir(exist_ok=True)
     state.workspace.joinpath("apt/log").mkdir(exist_ok=True)
-    state.root.joinpath("var/lib/dpkg").mkdir(exist_ok=True)
+    state.root.joinpath("var").mkdir(mode=0o755, exist_ok=True)
+    state.root.joinpath("var/lib").mkdir(mode=0o755, exist_ok=True)
+    state.root.joinpath("var/lib/dpkg").mkdir(mode=0o755, exist_ok=True)
     state.root.joinpath("var/lib/dpkg/status").touch()
 
     config_file = state.workspace / "apt/apt.conf"