summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-10-02 15:22:10 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2009-03-19 20:22:36 +0100
commite3105234f8840679197b171b51203ad6c90349b3 (patch)
tree482362bca6a38e7db3751f8a845823c400b9b1e5
parent69ac369a10e51f6f2d59e4e1da86d99f64285f71 (diff)
packaged-staging.bbclass: Add rpm package coverage (from Poky)
git-svn-id: https://svn.o-hand.com/repos/poky@5382 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--classes/packaged-staging.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index d6272b8145..849f60c500 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -361,6 +361,8 @@ python do_package_stage () {
ipkpath = bb.data.getVar('DEPLOY_DIR_IPK', d, True).replace(tmpdir, stagepath)
if bb.data.inherits_class('package_deb', d):
debpath = bb.data.getVar('DEPLOY_DIR_DEB', d, True).replace(tmpdir, stagepath)
+ if bb.data.inherits_class('package_rpm', d):
+ rpmpath = bb.data.getVar('DEPLOY_DIR_RPM', d, True).replace(tmpdir, stagepath)
for pkg in packages:
pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
@@ -393,6 +395,18 @@ python do_package_stage () {
bb.mkdirhier(destpath)
bb.copyfile(srcfile, destpath + srcname)
+ if bb.data.inherits_class('package_rpm', d):
+ version = bb.data.getVar('PV', d, 1)
+ version = version.replace('-', '+')
+ bb.data.setVar('RPMPV', version, d)
+ srcname = bb.data.expand(pkgname + "-${RPMPV}-" + pr + ".${TARGET_ARCH}.rpm", d)
+ srcfile = bb.data.expand("${DEPLOY_DIR_RPM}/" + arch + "/" + srcname, d)
+ if os.path.exists(srcfile):
+ destpath = rpmpath + "/" + arch + "/"
+ bb.mkdirhier(destpath)
+ bb.copyfile(srcfile, destpath + srcname)
+
+
#
# Handle stamps/ files
#