summaryrefslogtreecommitdiffstats
path: root/meta/classes/packageinfo.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/packageinfo.bbclass')
-rw-r--r--meta/classes/packageinfo.bbclass35
1 files changed, 14 insertions, 21 deletions
diff --git a/meta/classes/packageinfo.bbclass b/meta/classes/packageinfo.bbclass
index 42fcd04150..7d60ace1dc 100644
--- a/meta/classes/packageinfo.bbclass
+++ b/meta/classes/packageinfo.bbclass
@@ -1,27 +1,20 @@
1python packageinfo_handler () { 1python packageinfo_handler () {
2 import oe.packagedata 2 import oe.packagedata
3 pkginfolist = [] 3 pkginfolist = []
4 tmpdir = e.data.getVar('TMPDIR', True) 4
5 target_vendor = e.data.getVar('TARGET_VENDOR', True) 5 pkgdata_dir = e.data.getVar("PKGDATA_DIR", True) + '/runtime/'
6 target_os = e.data.getVar('TARGET_OS', True) 6 if os.path.exists(pkgdata_dir):
7 package_archs = e.data.getVar('PACKAGE_ARCHS', True) 7 for root, dirs, files in os.walk(pkgdata_dir):
8 packaging = e.data.getVar('PACKAGE_CLASSES', True).split()[0].split('_')[1] 8 for pkgname in files:
9 deploy_dir = e.data.getVar('DEPLOY_DIR', True) + '/' + packaging 9 if pkgname.endswith('.packaged'):
10 10 pkgname = pkgname[:-9]
11 for arch in package_archs.split(): 11 pkgdatafile = root + pkgname
12 pkgdata_dir = tmpdir + '/pkgdata/' + arch + target_vendor + '-' + target_os + '/runtime/' 12 try:
13 if os.path.exists(pkgdata_dir): 13 sdata = oe.packagedata.read_pkgdatafile(pkgdatafile)
14 for root, dirs, files in os.walk(pkgdata_dir): 14 sdata['PKG'] = pkgname
15 for pkgname in files: 15 pkginfolist.append(sdata)
16 if pkgname.endswith('.packaged'): 16 except Exception as e:
17 pkgname = pkgname[:-9] 17 bb.warn("Failed to read pkgdata file %s: %s: %s" % (pkgdatafile, e.__class__, str(e)))
18 pkgdatafile = root + pkgname
19 try:
20 sdata = oe.packagedata.read_pkgdatafile(pkgdatafile)
21 sdata['PKG'] = pkgname
22 pkginfolist.append(sdata)
23 except Exception as e:
24 bb.warn("Failed to read pkgdata file %s: %s: %s" % (pkgdatafile, e.__class__, str(e)))
25 bb.event.fire(bb.event.PackageInfo(pkginfolist), e.data) 18 bb.event.fire(bb.event.PackageInfo(pkginfolist), e.data)
26} 19}
27 20