[oe-commits] [openembedded-core] 30/83: util-linux: add su.1 to update-alternatives

git at git.openembedded.org git at git.openembedded.org
Sun Nov 6 23:36:42 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 70a161ee88d3d54fec6d59039c181b43f1857dc3
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Nov 1 14:50:35 2016 +0000

    util-linux: add su.1 to update-alternatives
    
    The su binary is handled by alternatives but the man page wasn't, so
    installing both util-linux-doc and shadow-doc produces errors.
    
    Also use d.expand() to neaten the code.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index c635502..70cba6b 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -271,9 +271,11 @@ 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('base_bindir', True), alt_name))
-        d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name)
+        d.appendVar(d.expand('ALTERNATIVE_${PN}'), ' su')
+        d.appendVar(d.expand('ALTERNATIVE_${PN}-doc'), ' su.1')
+
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', "su", d.expand('${base_bindir}/su'))
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', "su.1", d.expand('${mandir}/man1/su.1'))
 }
 
 python populate_packages_prepend() {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list