diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-03-06 16:29:46 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-09 12:07:01 -0700 |
| commit | aacc3814c2c44df42c00fe78f62e52be3744deeb (patch) | |
| tree | 4463069dd30370e46ebf853c0df7db37e682dbee | |
| parent | abe417e22b1b55c444460f722ca434f9d382ef87 (diff) | |
| download | poky-aacc3814c2c44df42c00fe78f62e52be3744deeb.tar.gz | |
toaster.bbclass: read list of files in image
We read the list of files in a built image and send it
over with the same event for packages in image.
(From OE-Core rev: 21bb659beca69c8bb379af2bf10afc843f529e57)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/toaster.bbclass | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index eed30d4b23..ddfceb5e91 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass | |||
| @@ -240,10 +240,15 @@ python toaster_buildhistory_dump() { | |||
| 240 | # scan the build targets for this build | 240 | # scan the build targets for this build |
| 241 | images = {} | 241 | images = {} |
| 242 | allpkgs = {} | 242 | allpkgs = {} |
| 243 | files = {} | ||
| 243 | for target in e._pkgs: | 244 | for target in e._pkgs: |
| 244 | installed_img_path = e.data.expand(os.path.join(BUILDHISTORY_DIR_IMAGE_BASE, target)) | 245 | installed_img_path = e.data.expand(os.path.join(BUILDHISTORY_DIR_IMAGE_BASE, target)) |
| 245 | if os.path.exists(installed_img_path): | 246 | if os.path.exists(installed_img_path): |
| 246 | images[target] = {} | 247 | images[target] = {} |
| 248 | files[target] = {} | ||
| 249 | files[target]['dirs'] = [] | ||
| 250 | files[target]['syms'] = [] | ||
| 251 | files[target]['files'] = [] | ||
| 247 | with open("%s/installed-package-sizes.txt" % installed_img_path, "r") as fin: | 252 | with open("%s/installed-package-sizes.txt" % installed_img_path, "r") as fin: |
| 248 | for line in fin: | 253 | for line in fin: |
| 249 | line = line.rstrip(";") | 254 | line = line.rstrip(";") |
| @@ -270,12 +275,22 @@ python toaster_buildhistory_dump() { | |||
| 270 | images[target][dependsname] = {'size': 0, 'depends' : []} | 275 | images[target][dependsname] = {'size': 0, 'depends' : []} |
| 271 | images[target][pname]['depends'].append((dependsname, deptype)) | 276 | images[target][pname]['depends'].append((dependsname, deptype)) |
| 272 | 277 | ||
| 278 | with open("%s/files-in-image.txt" % installed_img_path, "r") as fin: | ||
| 279 | for line in fin: | ||
| 280 | lc = [ x for x in line.strip().split(" ") if len(x) > 0 ] | ||
| 281 | if lc[0].startswith("l"): | ||
| 282 | files[target]['syms'].append(lc) | ||
| 283 | elif lc[0].startswith("d"): | ||
| 284 | files[target]['dirs'].append(lc) | ||
| 285 | else: | ||
| 286 | files[target]['files'].append(lc) | ||
| 287 | |||
| 273 | for pname in images[target]: | 288 | for pname in images[target]: |
| 274 | if not pname in allpkgs: | 289 | if not pname in allpkgs: |
| 275 | allpkgs[pname] = _toaster_load_pkgdatafile("%s/runtime-reverse/" % pkgdata_dir, pname) | 290 | allpkgs[pname] = _toaster_load_pkgdatafile("%s/runtime-reverse/" % pkgdata_dir, pname) |
| 276 | 291 | ||
| 277 | 292 | ||
| 278 | data = { 'pkgdata' : allpkgs, 'imgdata' : images } | 293 | data = { 'pkgdata' : allpkgs, 'imgdata' : images, 'filedata' : files } |
| 279 | 294 | ||
| 280 | bb.event.fire(bb.event.MetadataEvent("ImagePkgList", data), e.data) | 295 | bb.event.fire(bb.event.MetadataEvent("ImagePkgList", data), e.data) |
| 281 | 296 | ||
