[oe-commits] [openembedded-core] 09/09: multilib_script: use MLPREFIX instead of libdir when renaming

git at git.openembedded.org git at git.openembedded.org
Tue Jul 2 23:05:30 UTC 2019


This is an automated email from the git hooks/post-receive script.

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

commit e79eb82d3638124017ffc6df6ab1a1e923d3457e
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Jul 2 16:22:48 2019 +0100

    multilib_script: use MLPREFIX instead of libdir when renaming
    
    Instead of using part of ${base_libdir} to rename scripts, use MLPREFIX.  This
    is more obvious as MLPREFIX is a common prefix in package names, and as these
    filenames are hidden behind alternatives they're rarely used directly.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/multilib_script.bbclass | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/classes/multilib_script.bbclass b/meta/classes/multilib_script.bbclass
index b11efc1..de95dc6 100644
--- a/meta/classes/multilib_script.bbclass
+++ b/meta/classes/multilib_script.bbclass
@@ -6,8 +6,6 @@
 
 inherit update-alternatives
 
-MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
-
 PACKAGE_PREPROCESS_FUNCS += "multilibscript_rename"
 
 multilibscript_rename() {
@@ -26,9 +24,10 @@ python () {
         pkg, script = entry.split(":")
         epkg = d.expand(pkg)
         scriptname = os.path.basename(script)
+        mlname = os.path.join(os.path.dirname(script), "${MLPREFIX}" + scriptname)
         d.appendVar("ALTERNATIVE_" + epkg, " " + scriptname + " ")
         d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
-        d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
-        d.appendVar("multilibscript_rename",  "\n	mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
-        d.appendVar("FILES_" + epkg, " " + script + "-${MULTILIB_SUFFIX}")
+        d.setVarFlag("ALTERNATIVE_TARGET", scriptname, mlname)
+        d.appendVar("FILES_" + epkg, " " + mlname)
+        d.appendVar("multilibscript_rename",  "\n	mv ${PKGD}" + script + " ${PKGD}" + mlname)
 }

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


More information about the Openembedded-commits mailing list