]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: Expose resolv-conf alternative only when resolved is built
authorAlexandre Bard <Alexandre.Bard@netmodule.com>
Wed, 2 Oct 2019 12:12:22 +0000 (12:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Oct 2019 19:22:02 +0000 (20:22 +0100)
When systemd is built without internal resolver, it does not make
sense to expose it as a resolv-conf alternative and can even break
images where this alternative would be chosen, because of an
invalid symlink.

Signed-off-by: Alexandre Bard <alexandre.bard@netmodule.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_243.bb

index eaa12ed10712fa449ba9d9defee90db6d92831e0..b9097593f17e70e7d88da0a8e0c98caea9b60f59 100644 (file)
@@ -637,7 +637,7 @@ python do_warn_musl() {
 }
 addtask warn_musl before do_configure
 
-ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel resolv-conf"
+ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
 
 ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
 ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"