diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-08-11 10:38:30 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-12 17:21:54 +0100 |
commit | 83ada5598fbc67705bf613f8f4a42674bd1432ae (patch) | |
tree | 7d5a444411b27007d3517716b890e22d910e063d /meta/classes/package_rpm.bbclass | |
parent | 93084574046b2b64826bd5ebde55a0504f3b9283 (diff) | |
download | poky-83ada5598fbc67705bf613f8f4a42674bd1432ae.tar.gz |
package_rpm.bbclass: Update the platform config and --target
When constructing the /etc/rpm/platform file, we need to ensure that
the any, all, and noarch platforms will allow any "linux" variant to
be installable, not just matching variants.. i.e.
arm-oe-linux-gnueabi should be able to install noarch-oe-linux
Also ensure that we pass the full canonical arch via the --target=
parameter. This allows us to define the proper platform settings
for all packages.
(From OE-Core rev: c6bb9445de90cfb46db9c40842dbe1bfbb5b8ce8)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 59e8d48b20..5c67f69bb9 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -177,7 +177,15 @@ package_install_internal_rpm () { | |||
177 | echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform | 177 | echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform |
178 | if [ ! -z "$platform_extra" ]; then | 178 | if [ ! -z "$platform_extra" ]; then |
179 | for pt in $platform_extra ; do | 179 | for pt in $platform_extra ; do |
180 | echo "$pt-.*-${TARGET_OS}" >> ${target_rootfs}/etc/rpm/platform | 180 | case $pt in |
181 | noarch | any | all) | ||
182 | os="`echo ${TARGET_OS} | sed "s,-.*,,"`.*" | ||
183 | ;; | ||
184 | *) | ||
185 | os="${TARGET_OS}" | ||
186 | ;; | ||
187 | esac | ||
188 | echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform | ||
181 | done | 189 | done |
182 | fi | 190 | fi |
183 | 191 | ||
@@ -821,13 +829,13 @@ python do_package_rpm () { | |||
821 | targetsys = bb.data.getVar('TARGET_SYS', d, True) | 829 | targetsys = bb.data.getVar('TARGET_SYS', d, True) |
822 | targetvendor = bb.data.getVar('TARGET_VENDOR', d, True) | 830 | targetvendor = bb.data.getVar('TARGET_VENDOR', d, True) |
823 | pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d) | 831 | pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d) |
824 | pkgarch = bb.data.expand('${PACKAGE_ARCH}', d) | 832 | pkgarch = bb.data.expand('${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d) |
825 | magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d) | 833 | magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d) |
826 | bb.mkdirhier(pkgwritedir) | 834 | bb.mkdirhier(pkgwritedir) |
827 | os.chmod(pkgwritedir, 0755) | 835 | os.chmod(pkgwritedir, 0755) |
828 | 836 | ||
829 | cmd = rpmbuild | 837 | cmd = rpmbuild |
830 | cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + targetvendor + "-linux-gnu --buildroot " + pkgd | 838 | cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd |
831 | cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" | 839 | cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" |
832 | cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" | 840 | cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" |
833 | cmd = cmd + " --define '_use_internal_dependency_generator 0'" | 841 | cmd = cmd + " --define '_use_internal_dependency_generator 0'" |