summaryrefslogtreecommitdiff
path: root/meta/classes/package_tar.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_tar.bbclass
parent80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff)
downloadopenembedded-core-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.gz
openembedded-core-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.bz2
openembedded-core-c54117458a19d05d404ec00907a8f3e9c73a416b.zip
classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/package_tar.bbclass')
-rw-r--r--meta/classes/package_tar.bbclass6
1 files changed, 1 insertions, 5 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 876cec6cfe..24a77be93c 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -3,15 +3,12 @@ inherit package
IMAGE_PKGTYPE ?= "tar"
python package_tar_fn () {
- import os
- from bb import data
fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), bb.data.getVar('PR', d)))
fn = bb.data.expand(fn, d)
bb.data.setVar('PKGFN', fn, d)
}
python package_tar_install () {
- import os, sys
pkg = bb.data.getVar('PKG', d, 1)
pkgfn = bb.data.getVar('PKGFN', d, 1)
rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1)
@@ -23,6 +20,7 @@ python package_tar_install () {
bb.mkdirhier(rootfs)
os.chdir(rootfs)
except OSError:
+ import sys
(type, value, traceback) = sys.exc_info()
print value
raise bb.build.FuncFailed
@@ -42,7 +40,6 @@ python do_package_tar () {
bb.error("WORKDIR not defined, unable to package")
return
- import os # path manipulations
outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1)
if not outdir:
bb.error("DEPLOY_DIR_TAR not defined, unable to package")
@@ -94,7 +91,6 @@ python do_package_tar () {
}
python () {
- import bb
if bb.data.getVar('PACKAGES', d, True) != '':
deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split()
deps.append('tar-native:do_populate_staging')