1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 17:39:31 +00:00

update-alternatives: Fix for compatibility with multilib recipes

The PN == BPN test was designed to exclude native/nativesdk but also unfortunately
excludes multilib unintentionally. This change fixes this and allows multilib images
with alternatives to funciton correctly.

[YOCTO #2214]

(From OE-Core rev: 2878d19c4e19d76cb8be15825c40ff03f25f35f5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2012-04-14 18:31:24 +01:00
parent dc2192cabc
commit 6ea6facd66
+3 -2
View File
@@ -69,15 +69,16 @@ done
} }
update_alternatives_batch_doinstall() { update_alternatives_batch_doinstall() {
if [ "${PN}" = "${BPN}" ] ; then
for link in ${ALTERNATIVE_LINKS} for link in ${ALTERNATIVE_LINKS}
do do
mv ${D}${link} ${D}${link}.${PN} mv ${D}${link} ${D}${link}.${PN}
done done
fi
} }
def update_alternatives_after_parse(d): def update_alternatives_after_parse(d):
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d):
return
if d.getVar('ALTERNATIVE_LINKS') != None: if d.getVar('ALTERNATIVE_LINKS') != None:
doinstall = d.getVar('do_install', 0) doinstall = d.getVar('do_install', 0)
doinstall += d.getVar('update_alternatives_batch_doinstall', 0) doinstall += d.getVar('update_alternatives_batch_doinstall', 0)