summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-04-18 20:48:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-18 15:55:04 +0100
commitd233c90823f7b443cad7ff6f5f3a74672e5edbf6 (patch)
treef22b5fe1bcba8bc4e92a1adfe8dc16acbd230e4d
parentb76513948b754458f0b1ea63290f46253aa5d624 (diff)
downloadpoky-d233c90823f7b443cad7ff6f5f3a74672e5edbf6.tar.gz
poky-d233c90823f7b443cad7ff6f5f3a74672e5edbf6.tar.bz2
poky-d233c90823f7b443cad7ff6f5f3a74672e5edbf6.zip
packageinfo.bbclass: A workaround for RPM architecture renaming
For beagleboard platform, the PACKAGE_ARCH for certain recipes is "armv7a-vfp-neon", however, the architecture label in RPM file name is "armv7a" due to a potential bug in RPM backend. This commit is a workaround to make Hob work in this case. (From OE-Core rev: 00bd4589b21fe3a716ff2732ea55651c4abd77e4) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/packageinfo.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/packageinfo.bbclass b/meta/classes/packageinfo.bbclass
index 46b9097a54..26cce604ae 100644
--- a/meta/classes/packageinfo.bbclass
+++ b/meta/classes/packageinfo.bbclass
@@ -20,14 +20,25 @@ python packageinfo_handler () {
pkgrename = sdata['PKG_%s' % pkgname]
pkgv = sdata['PKGV'].replace('-', '+')
pkgr = sdata['PKGR']
+ # We found there are some renaming issue with certain architecture.
+ # For example, armv7a-vfp-neon, it will use armv7a in the rpm file. This is the workaround for it.
+ arch_tmp = arch.split('-')[0]
if os.path.exists(deploy_dir + '/' + arch + '/' + \
pkgname + '-' + pkgv + '-' + pkgr + '.' + arch + '.' + packaging) or \
os.path.exists(deploy_dir + '/' + arch + '/' + \
+ pkgname + '-' + pkgv + '-' + pkgr + '.' + arch_tmp + '.' + packaging) or \
+ os.path.exists(deploy_dir + '/' + arch + '/' + \
pkgrename + '-' + pkgv + '-' + pkgr + '.' + arch + '.' + packaging) or \
os.path.exists(deploy_dir + '/' + arch + '/' + \
+ pkgrename + '-' + pkgv + '-' + pkgr + '.' + arch_tmp + '.' + packaging) or \
+ os.path.exists(deploy_dir + '/' + arch + '/' + \
pkgname + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging) or \
os.path.exists(deploy_dir + '/' + arch + '/' + \
- pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging):
+ pkgname + '_' + pkgv + '-' + pkgr + '_' + arch_tmp + '.' + packaging) or \
+ os.path.exists(deploy_dir + '/' + arch + '/' + \
+ pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging) or \
+ os.path.exists(deploy_dir + '/' + arch + '/' + \
+ pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch_tmp + '.' + packaging):
pkginfolist.append(sdata)
bb.event.fire(bb.event.PackageInfo(pkginfolist), e.data)
}