systemd: Expose resolv-conf alternative only when resolved is built
PATCH 1/1 systemd: Expose resolv-conf alternative only when resolved is built
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.
--- meta/recipes-core/systemd/systemd_241.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_241.bb +1 -1
@@ -601,7 +601,7 @@ python __anonymous() { d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") } -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"
Signature · 1 line
2.20.1
Quoted 4 lines · Alexandre Bard
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.
Does Master have this issue?
- armin
Quoted 19 lines
Signed-off-by Alexandre Bard <[email protected]>--- meta/recipes-core/systemd/systemd_241.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/systemd/systemd_241.bb +1
-1@@ -601,7 +601,7 @@ python __anonymous() { d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") } -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"
Quoted 9 lines · On 06.10.19 19:32, akuster808 wrote:
Quoted 4 lines · Alexandre Bard
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.
Does Master have this issue?
- armin
Yes it does and the patch is already available:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=fb427f4f5c90d10f85ddad160e78209ed2b8100d
Alexandre
Quoted 18 lines
Quoted 18 lines
Signed-off-by Alexandre Bard <[email protected]>--- meta/recipes-core/systemd/systemd_241.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/systemd/systemd_241.bb +1
-1@@ -601,7 +601,7 @@ python __anonymous() { d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") } -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"