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