]> code.ossystems Code Review - openembedded-core.git/commitdiff
util-linux: use u-a for su
authorHongxu Jia <hongxu.jia@windriver.com>
Fri, 26 Jul 2013 12:09:08 +0000 (20:09 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Jul 2013 05:56:27 +0000 (06:56 +0100)
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>
meta/recipes-core/util-linux/util-linux.inc

index 3c8c246974c88fb72847d2a62cd23fb024db06a0..961bcc58431ef300d9cdcdc837b3fa7484a35932 100644 (file)
@@ -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)
+}