summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAndrei Dinu <andrei.adrianx.dinu@intel.com>2013-04-04 13:46:09 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-04 14:10:56 +0100
commit4dbdcf946297e58b3e66d961d0efcf6fb395a7be (patch)
treebdf04ee9dec0b376fe40bae2c1defc06a69378ef /meta/classes
parent824856181b429705ea1f528413c06a0efbf1c9d8 (diff)
downloadpoky-4dbdcf946297e58b3e66d961d0efcf6fb395a7be.tar.gz
Add file information to package information window
Removed the package files parsing routine from the packageinfo.bbclass file and added it to the package.bbclass file. (From OE-Core rev: 225e7826b0d082f43db82201e826b98b3a95cd57) Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass10
-rw-r--r--meta/classes/packageinfo.bbclass20
2 files changed, 10 insertions, 20 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 3479947141..826a54e572 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1130,6 +1130,13 @@ python emit_pkgdata() {
1130 workdir = d.getVar('WORKDIR', True) 1130 workdir = d.getVar('WORKDIR', True)
1131 1131
1132 for pkg in packages.split(): 1132 for pkg in packages.split():
1133 items = {}
1134 for files_list in pkgfiles[pkg]:
1135 item_name = os.path.basename(files_list)
1136 item_path = os.path.dirname(files_list)
1137 if item_path not in items:
1138 items[item_path] = []
1139 items[item_path].append(item_name)
1133 subdata_file = pkgdatadir + "/runtime/%s" % pkg 1140 subdata_file = pkgdatadir + "/runtime/%s" % pkg
1134 1141
1135 pkgval = d.getVar('PKG_%s' % pkg, True) 1142 pkgval = d.getVar('PKG_%s' % pkg, True)
@@ -1137,6 +1144,8 @@ python emit_pkgdata() {
1137 pkgval = pkg 1144 pkgval = pkg
1138 d.setVar('PKG_%s' % pkg, pkg) 1145 d.setVar('PKG_%s' % pkg, pkg)
1139 1146
1147 d.setVar('FILES_INFO', str(items))
1148
1140 sf = open(subdata_file, 'w') 1149 sf = open(subdata_file, 'w')
1141 write_if_exists(sf, pkg, 'PN') 1150 write_if_exists(sf, pkg, 'PN')
1142 write_if_exists(sf, pkg, 'PV') 1151 write_if_exists(sf, pkg, 'PV')
@@ -1161,6 +1170,7 @@ python emit_pkgdata() {
1161 write_if_exists(sf, pkg, 'pkg_preinst') 1170 write_if_exists(sf, pkg, 'pkg_preinst')
1162 write_if_exists(sf, pkg, 'pkg_prerm') 1171 write_if_exists(sf, pkg, 'pkg_prerm')
1163 write_if_exists(sf, pkg, 'FILERPROVIDESFLIST') 1172 write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
1173 write_if_exists(sf, pkg, 'FILES_INFO')
1164 for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or "").split(): 1174 for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or "").split():
1165 write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile) 1175 write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
1166 1176
diff --git a/meta/classes/packageinfo.bbclass b/meta/classes/packageinfo.bbclass
index 5e6f5901e0..4709bea359 100644
--- a/meta/classes/packageinfo.bbclass
+++ b/meta/classes/packageinfo.bbclass
@@ -8,24 +8,6 @@ python packageinfo_handler () {
8 package_archs = e.data.getVar('PACKAGE_ARCHS', True) 8 package_archs = e.data.getVar('PACKAGE_ARCHS', True)
9 packaging = e.data.getVar('PACKAGE_CLASSES', True).split()[0].split('_')[1] 9 packaging = e.data.getVar('PACKAGE_CLASSES', True).split()[0].split('_')[1]
10 deploy_dir = e.data.getVar('DEPLOY_DIR', True) + '/' + packaging 10 deploy_dir = e.data.getVar('DEPLOY_DIR', True) + '/' + packaging
11 dirs = os.listdir(tmpdir + '/work/')
12 pkgsplit_dir = tmpdir + '/work/'
13 items = {}
14 passing = ''
15 for directories in dirs:
16 temp_dirs = os.listdir(pkgsplit_dir + directories)
17 for temps1 in temp_dirs:
18 if os.path.exists(pkgsplit_dir + directories + '/' + temps1 + '/' + os.listdir(pkgsplit_dir + directories + '/' + temps1)[0] + '/packages-split'):
19 subs = pkgsplit_dir + directories + '/' + temps1 + '/' + os.listdir(pkgsplit_dir + directories + '/' + temps1)[0] + '/packages-split'
20 for temps in os.listdir(subs):
21 items[temps] = {}
22 for path, dirs, files in os.walk(pkgsplit_dir + directories + '/' + temps1 + '/' + os.listdir(pkgsplit_dir + directories + '/' + temps1)[0] + '/packages-split' + '/' + temps):
23 file_list = []
24 if os.listdir(path) != []:
25 items[temps][path] = []
26 for f in files:
27 file_list.append(f)
28 items[temps][path].append(file_list)
29 11
30 for arch in package_archs.split(): 12 for arch in package_archs.split():
31 pkgdata_dir = tmpdir + '/pkgdata/' + arch + target_vendor + '-' + target_os + '/runtime/' 13 pkgdata_dir = tmpdir + '/pkgdata/' + arch + target_vendor + '-' + target_os + '/runtime/'
@@ -38,8 +20,6 @@ python packageinfo_handler () {
38 try: 20 try:
39 sdata = oe.packagedata.read_pkgdatafile(pkgdatafile) 21 sdata = oe.packagedata.read_pkgdatafile(pkgdatafile)
40 sdata['PKG'] = pkgname 22 sdata['PKG'] = pkgname
41 if pkgname in items:
42 sdata['FILES_INFO'] = items[pkgname]
43 pkginfolist.append(sdata) 23 pkginfolist.append(sdata)
44 except Exception as e: 24 except Exception as e:
45 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)))