diff options
author | Andrei Dinu <andrei.adrianx.dinu@intel.com> | 2013-03-28 10:23:19 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-29 10:40:56 +0000 |
commit | 1e82bc1be1480c9f780944cc816ab05361ac0fb3 (patch) | |
tree | 64c3b065c64aff2d9f7c8eed223b530f0383c55b /meta | |
parent | 841ec528ec04e64bd09ff10f8d9ad2d6e3aac05d (diff) | |
download | poky-1e82bc1be1480c9f780944cc816ab05361ac0fb3.tar.gz |
packageinfo.bbclass : extended functionality
Extended the functionality of packageinfo.bbclass
so that the sistem retrieves information about the
files brought in by each package. This is done
(without activating buildhistory) by parsing
the packages-split directory for each package.
(From OE-Core rev: 108bae276fe7e462378073207a3bdca7326f8e57)
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/packageinfo.bbclass | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/packageinfo.bbclass b/meta/classes/packageinfo.bbclass index bd7b249bb4..5e6f5901e0 100644 --- a/meta/classes/packageinfo.bbclass +++ b/meta/classes/packageinfo.bbclass | |||
@@ -8,6 +8,25 @@ 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 | for arch in package_archs.split(): | 30 | for arch in package_archs.split(): |
12 | pkgdata_dir = tmpdir + '/pkgdata/' + arch + target_vendor + '-' + target_os + '/runtime/' | 31 | pkgdata_dir = tmpdir + '/pkgdata/' + arch + target_vendor + '-' + target_os + '/runtime/' |
13 | if os.path.exists(pkgdata_dir): | 32 | if os.path.exists(pkgdata_dir): |
@@ -19,6 +38,8 @@ python packageinfo_handler () { | |||
19 | try: | 38 | try: |
20 | sdata = oe.packagedata.read_pkgdatafile(pkgdatafile) | 39 | sdata = oe.packagedata.read_pkgdatafile(pkgdatafile) |
21 | sdata['PKG'] = pkgname | 40 | sdata['PKG'] = pkgname |
41 | if pkgname in items: | ||
42 | sdata['FILES_INFO'] = items[pkgname] | ||
22 | pkginfolist.append(sdata) | 43 | pkginfolist.append(sdata) |
23 | except Exception as e: | 44 | except Exception as e: |
24 | bb.warn("Failed to read pkgdata file %s: %s: %s" % (pkgdatafile, e.__class__, str(e))) | 45 | bb.warn("Failed to read pkgdata file %s: %s: %s" % (pkgdatafile, e.__class__, str(e))) |