]> code.ossystems Code Review - openembedded-core.git/commitdiff
multilib-script: Fix ALTERNATIVE_${PN} overwrite issue
authorZhixiong Chi <zhixiong.chi@windriver.com>
Fri, 10 Aug 2018 07:31:34 +0000 (00:31 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Aug 2018 10:36:22 +0000 (11:36 +0100)
If multilib scripts handle more than one file per package, the variable
ALTERNATIVE_${PN} will be overwritten and there will be only one symbol
link file. Append to the variable to avoid this.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/multilib_script.bbclass

index a5a552b7163e3fedac58107f22d6057a2ffeca69..51c9fcc12c504db40463a6f0884acfef998686d7 100644 (file)
@@ -25,7 +25,7 @@ python () {
     for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split():
        pkg, script = entry.split(":")
        scriptname = os.path.basename(script)
-       d.setVar("ALTERNATIVE_" + pkg, scriptname)
+       d.appendVar("ALTERNATIVE_" + pkg, 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}")