summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorChris Larson <kergoth@openedhand.com>2006-09-21 16:29:02 +0000
committerChris Larson <kergoth@openedhand.com>2006-09-21 16:29:02 +0000
commit8d804ea40a349e679850b716012120e54fe5242d (patch)
treed8b1d37ea78880df826f81bb4b791f8f93f1f985 /meta/classes/base.bbclass
parent5cacd3ea7efd69e57979d962616bf87c521c6f8b (diff)
downloadopenembedded-core-8d804ea40a349e679850b716012120e54fe5242d.tar.gz
openembedded-core-8d804ea40a349e679850b716012120e54fe5242d.tar.bz2
openembedded-core-8d804ea40a349e679850b716012120e54fe5242d.zip
Merge devgen branch to trunk.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@743 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass48
1 files changed, 42 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index a36829006e..0d5f5ea164 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -624,24 +624,60 @@ python read_shlibdeps () {
bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
}
-python read_subpackage_metadata () {
- import re
+def read_pkgdatafile(fn):
+ pkgdata = {}
def decode(str):
import codecs
c = codecs.getdecoder("string_escape")
return c(str)[0]
- data_file = bb.data.expand("${WORKDIR}/install/${PN}.package", d)
- if os.access(data_file, os.R_OK):
- f = file(data_file, 'r')
+ import os
+ if os.access(fn, os.R_OK):
+ import re
+ f = file(fn, 'r')
lines = f.readlines()
f.close()
r = re.compile("([^:]+):\s*(.*)")
for l in lines:
m = r.match(l)
if m:
- bb.data.setVar(m.group(1), decode(m.group(2)), d)
+ pkgdata[m.group(1)] = decode(m.group(2))
+
+ return pkgdata
+
+def has_subpkgdata(pkg, d):
+ import bb, os
+ fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d)
+ return os.access(fn, os.R_OK)
+
+def read_subpkgdata(pkg, d):
+ import bb, os
+ fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d)
+ return read_pkgdatafile(fn)
+
+
+def has_pkgdata(pn, d):
+ import bb, os
+ fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d)
+ return os.access(fn, os.R_OK)
+
+def read_pkgdata(pn, d):
+ import bb, os
+ fn = bb.data.expand('${STAGING_DIR}/pkgdata/%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():
+ bb.data.setVar(key, data[key], d)
+
+ for pkg in bb.data.getVar('PACKAGES', d, 1).split():
+ sdata = read_subpkgdata(pkg, d)
+ for key in sdata.keys():
+ bb.data.setVar(key, sdata[key], d)
}
python __anonymous () {