From: Richard Purdie Date: Thu, 2 Oct 2008 15:22:10 +0000 (+0000) Subject: packaged-staging.bbclass: Add rpm package coverage (from Poky) X-Git-Tag: Release-2010-05/1~3796^2~84^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3105234f8840679197b171b51203ad6c90349b3;p=openembedded.git 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 --- 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 #