diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 10:45:23 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 10:45:23 +0000 |
commit | bc465d83ad8665211b6f9664b418f4eafcc5ca6c (patch) | |
tree | 6e46f3cb3096127f0df9825f1670482da199fc9e /classes/package_rpm.bbclass | |
parent | d762c7504032becb9d05cd48c86dabb1ec764911 (diff) |
classes: Drop a number of unneeded import calls (from Poky)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
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 + |