[OE-core] [PATCH] systemd: install libnss-myhostname.so when myhostname be enabled

Wenlin Kang wenlin.kang at windriver.com
Wed Apr 10 09:24:33 UTC 2019


This fixes the follow issue, the cause is that net-tools needs
libnss-myhostname.so when run "hostname -s".

root at qemuarm64:~# hostname -s
hostname: Unknown host

Signed-off-by: Wenlin Kang <wenlin.kang at windriver.com>
---
 meta/recipes-core/systemd/systemd_241.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/systemd/systemd_241.bb b/meta/recipes-core/systemd/systemd_241.bb
index bfbfc81..251daaa 100644
--- a/meta/recipes-core/systemd/systemd_241.bb
+++ b/meta/recipes-core/systemd/systemd_241.bb
@@ -547,6 +547,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
 RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
 RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
 RDEPENDS_${PN} += "volatile-binds update-rc.d systemd-conf"
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'myhostname', 'libnss-myhostname', '', d)}"
 
 RRECOMMENDS_${PN} += "systemd-extra-utils \
                       systemd-compat-units udev-hwdb \
-- 
1.9.1



More information about the Openembedded-core mailing list