summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-12-14 16:40:33 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-19 17:55:00 +0000
commit84a5c63a57d60b1557268389cf333c69dd841fcd (patch)
tree110360d6d2046e9bf1734f883c7d34b1eb75e7ad /meta
parentcaaabe651023e2bb9eb5c0501ee3a76275b4aee2 (diff)
downloadpoky-84a5c63a57d60b1557268389cf333c69dd841fcd.tar.gz
classes/image: handle multilibs in complementary package lookup
For multilib the vendor string is altered, so we need to iterate over all of the multilib vendors when we do the glob processing for complementary packages. (From OE-Core rev: ff01518c6667e1b6e87df4e5a435a701d0f38fa7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> In addition, the RPM package arch have been munged by adding the multilib identifier. This identifier needs to be stripped when generating the installed_packages list for the complementary lookup code to work. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image.bbclass16
-rw-r--r--meta/classes/package_rpm.bbclass5
2 files changed, 19 insertions, 2 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 1461144949..8bf718a64b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -113,6 +113,17 @@ python () {
113 bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp)))) 113 bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp))))
114 114
115 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features))) 115 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
116
117 # Ensure we have the vendor list for complementary package handling
118 ml_vendor_list = ""
119 multilibs = d.getVar('MULTILIBS', True) or ""
120 for ext in multilibs.split():
121 eext = ext.split(':')
122 if len(eext) > 1 and eext[0] == 'multilib':
123 localdata = bb.data.createCopy(d)
124 vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False)
125 ml_vendor_list += " " + vendor
126 d.setVar('MULTILIB_VENDORS', ml_vendor_list)
116} 127}
117 128
118python image_handler () { 129python image_handler () {
@@ -357,7 +368,10 @@ rootfs_install_complementary() {
357 368
358 if [ "$GLOBS" != "" ] ; then 369 if [ "$GLOBS" != "" ] ; then
359 # Use the magic script to do all the work for us :) 370 # Use the magic script to do all the work for us :)
360 oe-pkgdata-util glob ${TMPDIR}/pkgdata ${TARGET_VENDOR}-${TARGET_OS} ${WORKDIR}/installed_pkgs.txt "$GLOBS" > ${WORKDIR}/complementary_pkgs.txt 371 : > ${WORKDIR}/complementary_pkgs.txt
372 for vendor in ${TARGET_VENDOR} ${MULTILIB_VENDORS} ; do
373 oe-pkgdata-util glob ${TMPDIR}/pkgdata $vendor-${TARGET_OS} ${WORKDIR}/installed_pkgs.txt "$GLOBS" >> ${WORKDIR}/complementary_pkgs.txt
374 done
361 375
362 # Install the packages, if any 376 # Install the packages, if any
363 sed -i '/^$/d' ${WORKDIR}/complementary_pkgs.txt 377 sed -i '/^$/d' ${WORKDIR}/complementary_pkgs.txt
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index a00b70205c..05108b26f1 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -99,8 +99,11 @@ translate_smart_to_oe() {
99 if [ "$arch" = "$cmp_arch" -o "$fixed_arch" = "$cmp_arch" ]; then 99 if [ "$arch" = "$cmp_arch" -o "$fixed_arch" = "$cmp_arch" ]; then
100 if [ "$mlib" = "default" ]; then 100 if [ "$mlib" = "default" ]; then
101 new_pkg="$pkg" 101 new_pkg="$pkg"
102 new_arch=$cmp_arch
102 else 103 else
103 new_pkg="$mlib-$pkg" 104 new_pkg="$mlib-$pkg"
105 # We need to strip off the ${mlib}_ prefix on the arch
106 new_arch=${cmp_arch#${mlib}_}
104 fi 107 fi
105 # Workaround for bug 3565 108 # Workaround for bug 3565
106 # Simply look to see if we know of a package with that name, if not try again! 109 # Simply look to see if we know of a package with that name, if not try again!
@@ -121,7 +124,7 @@ translate_smart_to_oe() {
121 124
122 #echo "$pkg -> $new_pkg" >&2 125 #echo "$pkg -> $new_pkg" >&2
123 if [ "$arg1" = "arch" ]; then 126 if [ "$arg1" = "arch" ]; then
124 echo $new_pkg $cmp_arch $other 127 echo $new_pkg $new_arch $other
125 else 128 else
126 echo $new_pkg $other 129 echo $new_pkg $other
127 fi 130 fi