diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2013-02-21 17:18:29 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-22 06:39:07 -0800 |
commit | c6209c96d9e0f466eb80072e7f02f935ec0c6249 (patch) | |
tree | c4f13a18918cbaf09e12a78a81615713142f2e0d /meta/classes/rootfs_rpm.bbclass | |
parent | 5fa61e368a037091969728f1090ea31b4f0f57df (diff) | |
download | poky-c6209c96d9e0f466eb80072e7f02f935ec0c6249.tar.gz |
rootfs_rpm.bbclass: Handle multilib configures with different OS values
[ CQID: WIND00404082 ]
It is possible for the TARGET_OS to change dependending on the multilib used
for a given package build. mips64 has two potential TARGET_OS values: linux
and linux-gnun32. The RPM and Smart setup needs to distinguish between the
two otherwise packages of the "non-default" TARGET_OS may be ignored as
incompatible.
(From OE-Core rev: aa760ff7dee4029c30c9de9fc0b640149e4a4c77)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 920380e559..9dc2bf997c 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass | |||
@@ -50,7 +50,7 @@ fakeroot rootfs_rpm_do_rootfs () { | |||
50 | # install packages | 50 | # install packages |
51 | # This needs to work in the same way as populate_sdk_rpm.bbclass! | 51 | # This needs to work in the same way as populate_sdk_rpm.bbclass! |
52 | export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}" | 52 | export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}" |
53 | export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" | 53 | export INSTALL_PLATFORM_RPM="$(echo ${TARGET_ARCH} | tr - _)${TARGET_VENDOR}-${TARGET_OS}" |
54 | export INSTALL_PACKAGES_RPM="${PACKAGE_INSTALL}" | 54 | export INSTALL_PACKAGES_RPM="${PACKAGE_INSTALL}" |
55 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" | 55 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" |
56 | export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}" | 56 | export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}" |
@@ -64,20 +64,31 @@ fakeroot rootfs_rpm_do_rootfs () { | |||
64 | # List must be prefered to least preferred order | 64 | # List must be prefered to least preferred order |
65 | default_extra_rpm="" | 65 | default_extra_rpm="" |
66 | INSTALL_PLATFORM_EXTRA_RPM="" | 66 | INSTALL_PLATFORM_EXTRA_RPM="" |
67 | for i in ${MULTILIB_PREFIX_LIST} ; do | 67 | for os in ${MULTILIB_OS_LIST} ; do |
68 | old_IFS="$IFS" | 68 | old_IFS="$IFS" |
69 | IFS=":" | 69 | IFS=":" |
70 | set $i | 70 | set -- $os |
71 | IFS="$old_IFS" | 71 | IFS="$old_IFS" |
72 | mlib=$1 | 72 | mlib=$1 |
73 | shift #remove mlib | 73 | mlib_os=$2 |
74 | while [ -n "$1" ]; do | 74 | for prefix in ${MULTILIB_PREFIX_LIST} ; do |
75 | if [ "$mlib" = "${BBEXTENDVARIANT}" ]; then | 75 | old_IFS="$IFS" |
76 | default_extra_rpm="$default_extra_rpm $1" | 76 | IFS=":" |
77 | else | 77 | set -- $prefix |
78 | INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $1" | 78 | IFS="$old_IFS" |
79 | if [ "$mlib" != "$1" ]; then | ||
80 | continue | ||
79 | fi | 81 | fi |
80 | shift | 82 | shift #remove mlib |
83 | while [ -n "$1" ]; do | ||
84 | platform="$(echo $1 | tr - _)-.*-$mlib_os" | ||
85 | if [ "$mlib" = "${BBEXTENDVARIANT}" ]; then | ||
86 | default_extra_rpm="$default_extra_rpm $platform" | ||
87 | else | ||
88 | INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $platform" | ||
89 | fi | ||
90 | shift | ||
91 | done | ||
81 | done | 92 | done |
82 | done | 93 | done |
83 | if [ -n "$default_extra_rpm" ]; then | 94 | if [ -n "$default_extra_rpm" ]; then |
@@ -210,7 +221,9 @@ python () { | |||
210 | # package_arch order is reversed. This ensures the -best- match is listed first! | 221 | # package_arch order is reversed. This ensures the -best- match is listed first! |
211 | package_archs = d.getVar("PACKAGE_ARCHS", True) or "" | 222 | package_archs = d.getVar("PACKAGE_ARCHS", True) or "" |
212 | package_archs = ":".join(package_archs.split()[::-1]) | 223 | package_archs = ":".join(package_archs.split()[::-1]) |
224 | package_os = d.getVar("TARGET_OS", True) or "" | ||
213 | ml_prefix_list = "%s:%s" % ('default', package_archs) | 225 | ml_prefix_list = "%s:%s" % ('default', package_archs) |
226 | ml_os_list = "%s:%s" % ('default', package_os) | ||
214 | multilibs = d.getVar('MULTILIBS', True) or "" | 227 | multilibs = d.getVar('MULTILIBS', True) or "" |
215 | for ext in multilibs.split(): | 228 | for ext in multilibs.split(): |
216 | eext = ext.split(':') | 229 | eext = ext.split(':') |
@@ -219,8 +232,12 @@ python () { | |||
219 | default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False) | 232 | default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False) |
220 | if default_tune: | 233 | if default_tune: |
221 | localdata.setVar("DEFAULTTUNE", default_tune) | 234 | localdata.setVar("DEFAULTTUNE", default_tune) |
235 | bb.data.update_data(localdata) | ||
222 | package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" | 236 | package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" |
223 | package_archs = ":".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()][::-1]) | 237 | package_archs = ":".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()][::-1]) |
238 | package_os = localdata.getVar("TARGET_OS", True) or "" | ||
224 | ml_prefix_list += " %s:%s" % (eext[1], package_archs) | 239 | ml_prefix_list += " %s:%s" % (eext[1], package_archs) |
240 | ml_os_list += " %s:%s" % (eext[1], package_os) | ||
225 | d.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list) | 241 | d.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list) |
242 | d.setVar('MULTILIB_OS_LIST', ml_os_list) | ||
226 | } | 243 | } |