multilib-script: Fix ALTERNATIVE_${PN} overwrite issue

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.

(From OE-Core rev: f474a7ed02acaffe5d0fcc67e06dde17fc8e4d0e)

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Zhixiong Chi
2018-08-10 00:31:34 -07:00
committed by Richard Purdie
parent e02e5c52fd
commit ecd4ac1962

View 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}")