summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-08 22:32:43 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-13 12:15:28 +0000
commitc54117458a19d05d404ec00907a8f3e9c73a416b (patch)
tree6cc5695742a1198668b022b35c8b2a456c4f3f4f /meta/classes/package_rpm.bbclass
parent80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff)
downloadpoky-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.gz
classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass8
1 files changed, 1 insertions, 7 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index d291733dcf..49e84678b8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -12,9 +12,6 @@ RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}"
12RPM="rpm ${RPMOPTS}" 12RPM="rpm ${RPMOPTS}"
13 13
14python write_specfile() { 14python write_specfile() {
15 from bb import data, build
16 import sys
17
18 version = bb.data.getVar('PV', d, 1) 15 version = bb.data.getVar('PV', d, 1)
19 version = version.replace('-', '+') 16 version = version.replace('-', '+')
20 bb.data.setVar('RPMPV', version, d) 17 bb.data.setVar('RPMPV', version, d)
@@ -55,8 +52,7 @@ python write_specfile() {
55 pass 52 pass
56 53
57 if not files and bb.data.getVar('ALLOW_EMPTY', d) != "1": 54 if not files and bb.data.getVar('ALLOW_EMPTY', d) != "1":
58 from bb import note 55 bb.note("Not creating empty archive for %s-%s-%s" % (bb.data.getVar('PKG',d, 1), bb.data.getVar('PV', d, 1), bb.data.getVar('PR', d, 1)))
59 note("Not creating empty archive for %s-%s-%s" % (bb.data.getVar('PKG',d, 1), bb.data.getVar('PV', d, 1), bb.data.getVar('PR', d, 1)))
60 return 56 return
61 57
62 # output .spec using this metadata store 58 # output .spec using this metadata store
@@ -159,7 +155,6 @@ python do_package_rpm () {
159 bb.error("WORKDIR not defined, unable to package") 155 bb.error("WORKDIR not defined, unable to package")
160 return 156 return
161 157
162 import os # path manipulations
163 outdir = bb.data.getVar('DEPLOY_DIR_RPM', d, 1) 158 outdir = bb.data.getVar('DEPLOY_DIR_RPM', d, 1)
164 if not outdir: 159 if not outdir:
165 bb.error("DEPLOY_DIR_RPM not defined, unable to package") 160 bb.error("DEPLOY_DIR_RPM not defined, unable to package")
@@ -213,7 +208,6 @@ python do_package_rpm () {
213} 208}
214 209
215python () { 210python () {
216 import bb
217 if bb.data.getVar('PACKAGES', d, True) != '': 211 if bb.data.getVar('PACKAGES', d, True) != '':
218 deps = (bb.data.getVarFlag('do_package_write_rpm', 'depends', d) or "").split() 212 deps = (bb.data.getVarFlag('do_package_write_rpm', 'depends', d) or "").split()
219 deps.append('rpm-native:do_populate_staging') 213 deps.append('rpm-native:do_populate_staging')