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/packagedata.bbclass | |
parent | 80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff) | |
download | openembedded-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/packagedata.bbclass')
-rw-r--r-- | meta/classes/packagedata.bbclass | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/meta/classes/packagedata.bbclass b/meta/classes/packagedata.bbclass index c9d64d6da2..86f18a9e96 100644 --- a/meta/classes/packagedata.bbclass +++ b/meta/classes/packagedata.bbclass @@ -1,5 +1,4 @@ def packaged(pkg, d): - import os, bb return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK) def read_pkgdatafile(fn): @@ -10,7 +9,6 @@ def read_pkgdatafile(fn): c = codecs.getdecoder("string_escape") return c(str)[0] - import os if os.access(fn, os.R_OK): import re f = file(fn, 'r') @@ -25,7 +23,6 @@ def read_pkgdatafile(fn): return pkgdata def get_subpkgedata_fn(pkg, d): - import bb, os archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ") archs.reverse() pkgdata = bb.data.expand('${TMPDIR}/pkgdata/', d) @@ -37,25 +34,20 @@ def get_subpkgedata_fn(pkg, d): return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) def has_subpkgdata(pkg, d): - import bb, os return os.access(get_subpkgedata_fn(pkg, d), os.R_OK) def read_subpkgdata(pkg, d): - import bb return read_pkgdatafile(get_subpkgedata_fn(pkg, d)) def has_pkgdata(pn, d): - import bb, os fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return os.access(fn, os.R_OK) def read_pkgdata(pn, d): - import bb fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return read_pkgdatafile(fn) python read_subpackage_metadata () { - import bb data = read_pkgdata(bb.data.getVar('PN', d, 1), d) for key in data.keys(): @@ -72,7 +64,6 @@ python read_subpackage_metadata () { # Collapse FOO_pkg variables into FOO # def read_subpkgdata_dict(pkg, d): - import bb ret = {} subd = read_pkgdatafile(get_subpkgedata_fn(pkg, d)) for var in subd: |