]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Drop absolute() usage in debian.py
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 15 Apr 2023 17:49:50 +0000 (19:49 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 17 Apr 2023 09:27:33 +0000 (11:27 +0200)
We now make sure paths are absolute when parsing them so no need to
do so anymore in debian.py

mkosi/distributions/debian.py

index 3dc73f298a7fda85efd8817380309d5e7759e9f6..a3b00b9d19af4905199c4c9405730fc89afcdfec 100644 (file)
@@ -36,7 +36,7 @@ class DebianInstaller(DistributionInstaller):
             "debootstrap",
             "--variant=minbase",
             "--merged-usr",
-            f"--cache-dir={state.cache.absolute()}",
+            f"--cache-dir={state.cache}",
             f"--components={','.join(repos)}",
         ]
 
@@ -174,15 +174,15 @@ def invoke_apt(
             APT::Install-Recommends "false";
             APT::Get::Assume-Yes "true";
             APT::Get::AutomaticRemove "true";
-            Dir::Cache "{state.cache.absolute()}";
-            Dir::State "{state.workspace.absolute() / "apt"}";
+            Dir::Cache "{state.cache}";
+            Dir::State "{state.workspace / "apt"}";
             Dir::State::status "{state.root / "var/lib/dpkg/status"}";
-            Dir::Etc "{state.root.absolute() / "etc/apt"}";
-            Dir::Log "{state.workspace.absolute() / "apt/log"}";
+            Dir::Etc "{state.root / "etc/apt"}";
+            Dir::Log "{state.workspace / "apt/log"}";
             Dir::Bin::dpkg "dpkg";
             DPkg::Path "{os.environ["PATH"]}";
-            DPkg::Options:: "--root={state.root.absolute()}";
-            DPkg::Options:: "--log={state.workspace.absolute() / "apt/dpkg.log"}";
+            DPkg::Options:: "--root={state.root}";
+            DPkg::Options:: "--log={state.workspace / "apt/dpkg.log"}";
             DPkg::Options:: "--force-unsafe-io";
             DPkg::Install::Recursive::Minimum "1000";
             """