summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-02-09 15:49:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-16 18:05:40 +0000
commitb9bf37ec6792f82753fe265fdcfc19db7dd51ab6 (patch)
tree7d05a80b9bd044a9ec11a52e27346be6f73ea9c9
parent51c6e1d1cbb64ca3128d7895ce3ff336e5109f53 (diff)
downloadpoky-b9bf37ec6792f82753fe265fdcfc19db7dd51ab6.tar.gz
coreutils: fix hostname conflict with other packages
The hostname utility is also provided by busybox and net-tools. So use alternatives mechanism to manage it in coreutils. Make its priority higher than busybox. As hostname is not built by default for coreutils, we make its priority lower than net-tools. (From OE-Core rev: fbdc676878cf2a29654e071a7c5afd5114cc9e0b) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.29.bb4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/coreutils/coreutils_8.29.bb b/meta/recipes-core/coreutils/coreutils_8.29.bb
index 8df88020e3..0b8acc5884 100644
--- a/meta/recipes-core/coreutils/coreutils_8.29.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.29.bb
@@ -52,7 +52,7 @@ bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname
52 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes" 52 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
53 53
54# hostname gets a special treatment and is not included in this 54# hostname gets a special treatment and is not included in this
55base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \ 55base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
56 mknod mv pwd rm rmdir sleep stty sync touch true uname stat" 56 mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
57 57
58sbindir_progs= "chroot" 58sbindir_progs= "chroot"
@@ -95,6 +95,8 @@ do_install_append() {
95inherit update-alternatives 95inherit update-alternatives
96 96
97ALTERNATIVE_PRIORITY = "100" 97ALTERNATIVE_PRIORITY = "100"
98# Make hostname's priority higher than busybox but lower than net-tools
99ALTERNATIVE_PRIORITY[hostname] = "90"
98ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df" 100ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
99ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1" 101ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
100 102