summaryrefslogtreecommitdiffstats
path: root/meta/classes/packagedata.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/packagedata.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/packagedata.bbclass')
-rw-r--r--meta/classes/packagedata.bbclass9
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 @@
1def packaged(pkg, d): 1def packaged(pkg, d):
2 import os, bb
3 return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK) 2 return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
4 3
5def read_pkgdatafile(fn): 4def read_pkgdatafile(fn):
@@ -10,7 +9,6 @@ def read_pkgdatafile(fn):
10 c = codecs.getdecoder("string_escape") 9 c = codecs.getdecoder("string_escape")
11 return c(str)[0] 10 return c(str)[0]
12 11
13 import os
14 if os.access(fn, os.R_OK): 12 if os.access(fn, os.R_OK):
15 import re 13 import re
16 f = file(fn, 'r') 14 f = file(fn, 'r')
@@ -25,7 +23,6 @@ def read_pkgdatafile(fn):
25 return pkgdata 23 return pkgdata
26 24
27def get_subpkgedata_fn(pkg, d): 25def get_subpkgedata_fn(pkg, d):
28 import bb, os
29 archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ") 26 archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
30 archs.reverse() 27 archs.reverse()
31 pkgdata = bb.data.expand('${TMPDIR}/pkgdata/', d) 28 pkgdata = bb.data.expand('${TMPDIR}/pkgdata/', d)
@@ -37,25 +34,20 @@ def get_subpkgedata_fn(pkg, d):
37 return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) 34 return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
38 35
39def has_subpkgdata(pkg, d): 36def has_subpkgdata(pkg, d):
40 import bb, os
41 return os.access(get_subpkgedata_fn(pkg, d), os.R_OK) 37 return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
42 38
43def read_subpkgdata(pkg, d): 39def read_subpkgdata(pkg, d):
44 import bb
45 return read_pkgdatafile(get_subpkgedata_fn(pkg, d)) 40 return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
46 41
47def has_pkgdata(pn, d): 42def has_pkgdata(pn, d):
48 import bb, os
49 fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) 43 fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d)
50 return os.access(fn, os.R_OK) 44 return os.access(fn, os.R_OK)
51 45
52def read_pkgdata(pn, d): 46def read_pkgdata(pn, d):
53 import bb
54 fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) 47 fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d)
55 return read_pkgdatafile(fn) 48 return read_pkgdatafile(fn)
56 49
57python read_subpackage_metadata () { 50python read_subpackage_metadata () {
58 import bb
59 data = read_pkgdata(bb.data.getVar('PN', d, 1), d) 51 data = read_pkgdata(bb.data.getVar('PN', d, 1), d)
60 52
61 for key in data.keys(): 53 for key in data.keys():
@@ -72,7 +64,6 @@ python read_subpackage_metadata () {
72# Collapse FOO_pkg variables into FOO 64# Collapse FOO_pkg variables into FOO
73# 65#
74def read_subpkgdata_dict(pkg, d): 66def read_subpkgdata_dict(pkg, d):
75 import bb
76 ret = {} 67 ret = {}
77 subd = read_pkgdatafile(get_subpkgedata_fn(pkg, d)) 68 subd = read_pkgdatafile(get_subpkgedata_fn(pkg, d))
78 for var in subd: 69 for var in subd: