diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-08 22:32:43 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:28 +0000 |
commit | c54117458a19d05d404ec00907a8f3e9c73a416b (patch) | |
tree | 6cc5695742a1198668b022b35c8b2a456c4f3f4f /meta/classes/package_tar.bbclass | |
parent | 80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff) | |
download | poky-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.gz |
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.bbclass | 6 |
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 | |||
3 | IMAGE_PKGTYPE ?= "tar" | 3 | IMAGE_PKGTYPE ?= "tar" |
4 | 4 | ||
5 | python package_tar_fn () { | 5 | python package_tar_fn () { |
6 | import os | ||
7 | from bb import data | ||
8 | 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))) | 6 | 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))) |
9 | fn = bb.data.expand(fn, d) | 7 | fn = bb.data.expand(fn, d) |
10 | bb.data.setVar('PKGFN', fn, d) | 8 | bb.data.setVar('PKGFN', fn, d) |
11 | } | 9 | } |
12 | 10 | ||
13 | python package_tar_install () { | 11 | python package_tar_install () { |
14 | import os, sys | ||
15 | pkg = bb.data.getVar('PKG', d, 1) | 12 | pkg = bb.data.getVar('PKG', d, 1) |
16 | pkgfn = bb.data.getVar('PKGFN', d, 1) | 13 | pkgfn = bb.data.getVar('PKGFN', d, 1) |
17 | rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1) | 14 | rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1) |
@@ -23,6 +20,7 @@ python package_tar_install () { | |||
23 | bb.mkdirhier(rootfs) | 20 | bb.mkdirhier(rootfs) |
24 | os.chdir(rootfs) | 21 | os.chdir(rootfs) |
25 | except OSError: | 22 | except OSError: |
23 | import sys | ||
26 | (type, value, traceback) = sys.exc_info() | 24 | (type, value, traceback) = sys.exc_info() |
27 | print value | 25 | print value |
28 | raise bb.build.FuncFailed | 26 | raise bb.build.FuncFailed |
@@ -42,7 +40,6 @@ python do_package_tar () { | |||
42 | bb.error("WORKDIR not defined, unable to package") | 40 | bb.error("WORKDIR not defined, unable to package") |
43 | return | 41 | return |
44 | 42 | ||
45 | import os # path manipulations | ||
46 | outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1) | 43 | outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1) |
47 | if not outdir: | 44 | if not outdir: |
48 | bb.error("DEPLOY_DIR_TAR not defined, unable to package") | 45 | bb.error("DEPLOY_DIR_TAR not defined, unable to package") |
@@ -94,7 +91,6 @@ python do_package_tar () { | |||
94 | } | 91 | } |
95 | 92 | ||
96 | python () { | 93 | python () { |
97 | import bb | ||
98 | if bb.data.getVar('PACKAGES', d, True) != '': | 94 | if bb.data.getVar('PACKAGES', d, True) != '': |
99 | deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split() | 95 | deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split() |
100 | deps.append('tar-native:do_populate_staging') | 96 | deps.append('tar-native:do_populate_staging') |