diff options
author | Graeme Gregory <dp@xora.org.uk> | 2009-11-18 09:15:55 +0000 |
---|---|---|
committer | Graeme Gregory <dp@xora.org.uk> | 2009-11-18 09:15:55 +0000 |
commit | 15387c72d5cf1a77a5a0afa6750dae73a8dbc12f (patch) | |
tree | ab55e077002322c8f245c79c87c6a6f2f7b0ed2e /classes/package_rpm.bbclass | |
parent | 7f3d2b172af63fc894f80eece075434b2c5fbbc5 (diff) | |
parent | e4e52ba358c094952ec868d32524a26dfa4bae89 (diff) |
Merge branch 'org.openembedded.dev' of git+ssh://git@git.openembedded.org/openembedded into org.openembedded.dev
Diffstat (limited to 'classes/package_rpm.bbclass')
-rw-r--r-- | classes/package_rpm.bbclass | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index 13cb8773af..ab09bb24d3 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -10,9 +10,6 @@ RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}" RPM="rpm ${RPMOPTS}" python write_specfile() { - from bb import data, build - import sys - version = bb.data.getVar('PV', d, 1) version = version.replace('-', '+') bb.data.setVar('RPMPV', version, d) @@ -50,9 +47,9 @@ python write_specfile() { del files[files.index(r)] except ValueError: pass + if not files and bb.data.getVar('ALLOW_EMPTY', d) != "1": - from bb import note - note("Not creating empty archive for %s" % (bb.data.expand('${PKG}-${PV}-${PR}${DISTRO_PR}', d, True))) + bb.note("Not creating empty archive for %s" % (bb.data.expand('${PKG}-${PV}-${PR}${DISTRO_PR}', d, True))) return # output .spec using this metadata store @@ -154,7 +151,6 @@ python do_package_rpm () { bb.error("WORKDIR not defined, unable to package") return - import os # path manipulations outdir = bb.data.getVar('DEPLOY_DIR_RPM', d, 1) if not outdir: bb.error("DEPLOY_DIR_RPM not defined, unable to package") @@ -209,7 +205,6 @@ python do_package_rpm () { } python () { - import bb if bb.data.getVar('PACKAGES', d, True) != '' and \ not bb.data.inherits_class('native', d) and \ not bb.data.inherits_class('cross', d): @@ -225,5 +220,7 @@ python do_package_write_rpm () { bb.build.exec_func("rpm_prep", d) bb.build.exec_func("do_package_rpm", d) } + do_package_write_rpm[dirs] = "${D}" addtask package_write_rpm before do_package_write after do_package + |