[oe-commits] Richard Purdie : packaged-staging.bbclass: Add rpm package coverage ( from Poky)

GIT User account git at amethyst.openembedded.net
Thu Mar 19 19:24:39 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: e3105234f8840679197b171b51203ad6c90349b3
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=e3105234f8840679197b171b51203ad6c90349b3

Author: Richard Purdie <richard at openedhand.com>
Date:   Thu Oct  2 15:22:10 2008 +0000

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

---

 classes/packaged-staging.bbclass |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index d6272b8..849f60c 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
     #





More information about the Openembedded-commits mailing list