summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-07-26 20:09:08 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-31 06:56:27 +0100
commit6190c69a9f78aeef951c39e4c8700e945bbec5f7 (patch)
tree12f052b081a9b2871b25c684189bfb1dc4293dea /meta
parent4a15433f12c616f06192a4cda209da29395ceb93 (diff)
downloadopenembedded-core-6190c69a9f78aeef951c39e4c8700e945bbec5f7.tar.gz
openembedded-core-6190c69a9f78aeef951c39e4c8700e945bbec5f7.tar.bz2
openembedded-core-6190c69a9f78aeef951c39e4c8700e945bbec5f7.zip
util-linux: use u-a for su
Use alternatives mechanism to prevent confliction of attempted installing su binary among busybox, shadow and util-linux. [YOCTO #4926] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 3c8c246974..961bcc5843 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -215,3 +215,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
BBCLASSEXTEND = "native nativesdk"
+
+python do_package_prepend () {
+ if '--enable-su' in d.getVar('EXTRA_OECONF', True).split():
+ alt_name = "su"
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name))
+ d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name)
+}