diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2013-07-26 20:09:08 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-31 06:59:58 +0100 |
commit | b33626429d54fc2df866230f08c0f4d2e7ec4c04 (patch) | |
tree | e3141f3d45e9ee71f5257883466ac6b5ca9f0716 | |
parent | 55770c09b978a7df28aeab8638f2d34797e819f6 (diff) | |
download | poky-b33626429d54fc2df866230f08c0f4d2e7ec4c04.tar.gz |
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]
(From OE-Core rev: 6190c69a9f78aeef951c39e4c8700e945bbec5f7)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 7 |
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" | |||
215 | ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" | 215 | ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" |
216 | 216 | ||
217 | BBCLASSEXTEND = "native nativesdk" | 217 | BBCLASSEXTEND = "native nativesdk" |
218 | |||
219 | python do_package_prepend () { | ||
220 | if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): | ||
221 | alt_name = "su" | ||
222 | d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name)) | ||
223 | d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) | ||
224 | } | ||