diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-08-05 10:52:10 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-19 20:06:25 +0100 |
commit | 0769e847cbefbbf2f083b7fc585a0479db6b18a1 (patch) | |
tree | 1913535866bd23de3d73a788aeb8f667108073ec /meta | |
parent | 14801197f97d33c715d387315c20fb4269b2fb91 (diff) | |
download | openembedded-core-0769e847cbefbbf2f083b7fc585a0479db6b18a1.tar.gz openembedded-core-0769e847cbefbbf2f083b7fc585a0479db6b18a1.tar.bz2 openembedded-core-0769e847cbefbbf2f083b7fc585a0479db6b18a1.zip |
package_(deb|rpm): Update to use packaged-staging2
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package_deb.bbclass | 18 | ||||
-rw-r--r-- | meta/classes/package_rpm.bbclass | 22 |
2 files changed, 30 insertions, 10 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index 14498db83f..d923ad1073 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -14,6 +14,8 @@ DPKG_ARCH_i586 ?= "i386" DPKG_ARCH_i686 ?= "i386" DPKG_ARCH_pentium ?= "i386" +PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs" + python package_deb_fn () { bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) } @@ -73,9 +75,9 @@ python do_package_deb () { bb.error("WORKDIR not defined, unable to package") return - outdir = bb.data.getVar('DEPLOY_DIR_DEB', d, True) + outdir = bb.data.getVar('PKGWRITEDIRDEB', d, True) if not outdir: - bb.error("DEPLOY_DIR_DEB not defined, unable to package") + bb.error("PKGWRITEDIRDEB not defined, unable to package") return dvar = bb.data.getVar('D', d, True) @@ -250,6 +252,16 @@ python do_package_deb () { bb.utils.unlockfile(lf) } +SSTATETASKS += "do_package_write_deb" +do_package_write_deb[sstate-name] = "deploy-deb" +do_package_write_deb[sstate-inputdirs] = "${PKGWRITEDIRDEB}" +do_package_write_deb[sstate-outputdirs] = "${DEPLOY_DIR_DEB}" + +python do_package_write_deb_setscene () { + sstate_setscene(d) +} +addtask do_package_write_deb_setscene + python () { if bb.data.getVar('PACKAGES', d, True) != '': deps = (bb.data.getVarFlag('do_package_write_deb', 'depends', d) or "").split() @@ -262,6 +274,6 @@ python do_package_write_deb () { bb.build.exec_func("read_subpackage_metadata", d) bb.build.exec_func("do_package_deb", d) } -do_package_write_deb[dirs] = "${D}" +do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" addtask package_write_deb before do_package_write after do_package diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index b829d0d068..273a7d44ed 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -1,7 +1,5 @@ inherit package -#IMAGE_PKGTYPE ?= "rpm" - IMAGE_PKGTYPE ?= "rpm" RPMBUILDPATH="${WORKDIR}/rpm" @@ -11,6 +9,8 @@ RPMBUILDOPTS="--target ${TARGET_SYS} --define '_topdir ${RPMBUILDPATH}' --buildr RPM="${BUILD_ARCH}-${BUILD_OS}-rpm ${RPMOPTS}" RPMBUILD="${BUILD_ARCH}-${BUILD_OS}-rpmbuild --short-circuit ${RPMBUILDOPTS}" +PKGWRITEDIRRPM = ${WORKDIR}/deploy-rpms" + python write_specfile() { version = bb.data.getVar('PV', d, 1) version = version.replace('-', '+') @@ -136,7 +136,7 @@ python write_specfile() { # move the rpm into the pkgoutdir rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d) - outrpm = bb.data.expand('${DEPLOY_DIR_RPM}/${PACKAGE_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d) + outrpm = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d) bb.movefile(rpm, outrpm) } @@ -152,9 +152,9 @@ python do_package_rpm () { bb.error("WORKDIR not defined, unable to package") return - outdir = bb.data.getVar('DEPLOY_DIR_RPM', d, 1) + outdir = bb.data.getVar('PKGWRITEDIRRPM', d, 1) if not outdir: - bb.error("DEPLOY_DIR_RPM not defined, unable to package") + bb.error("PKGWRITEDIRRPM not defined, unable to package") return bb.mkdirhier(outdir) @@ -208,13 +208,21 @@ python () { bb.data.setVarFlag('do_package_write_rpm', 'depends', " ".join(deps), d) } +SSTATETASKS += "do_package_write_rpm" +do_package_write_rpm[sstate-name] = "deploy-rpm" +do_package_write_rpm[sstate-inputdirs] = "${PKGWRITEDIRRPM}" +do_package_write_rpm[sstate-outputdirs] = "${DEPLOY_DIR_RPM}" + +python do_package_write_rpm_setscene () { + sstate_setscene(d) +} +addtask do_package_write_rpm_setscene python do_package_write_rpm () { bb.build.exec_func("read_subpackage_metadata", d) bb.build.exec_func("rpm_prep", d) bb.build.exec_func("do_package_rpm", d) } - -do_package_write_rpm[dirs] = "${D}" +do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" addtask package_write_rpm before do_package_write after do_package |