]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
debian: do not try to enable resolved if systemd is not in the package list
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 2 Nov 2021 14:22:55 +0000 (14:22 +0000)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Fri, 5 Nov 2021 10:25:51 +0000 (10:25 +0000)
It will not be installed, so it will fail

mkosi/__init__.py

index fed8d8daefb73cc92f55e57bc78ddbd8e0e9e855..467410faedb82fcef3179d88cb24e8fb345b5367 100644 (file)
@@ -2597,7 +2597,7 @@ def install_debian_or_ubuntu(args: CommandLineArguments, root: Path, *, do_run_b
         # Debian still has pam_securetty module enabled, disable it in the base image.
         disable_pam_securetty(root)
 
-    if args.distribution == Distribution.debian and args.base_image is None:
+    if args.distribution == Distribution.debian and "systemd" in extra_packages:
         # The default resolv.conf points to 127.0.0.1, and resolved is disabled, fix it in
         # the base image.
         root.joinpath("etc/resolv.conf").unlink()