]> code.ossystems Code Review - openembedded-core.git/commitdiff
toaster.bbclass: do not fail on non-existent files
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Fri, 11 Apr 2014 16:40:32 +0000 (17:40 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 19 Apr 2014 09:27:14 +0000 (10:27 +0100)
Toaster may look up inexistent file paths in the build history
for packages that have been referenced but not built.

This triggers a failure, and this patch recovers by deleting
the reference to the non-built packages.

[YOCTO #6063]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/toaster.bbclass

index d2fa82d73061338f6adfe1c04e927c9e41475b2c..4244b2ca7f5f652a970d52f4092bbb51ce51bbb4 100644 (file)
@@ -288,7 +288,15 @@ python toaster_buildhistory_dump() {
 
             for pname in images[target]:
                 if not pname in allpkgs:
-                    allpkgs[pname] = _toaster_load_pkgdatafile("%s/runtime-reverse/" % pkgdata_dir, pname)
+                    try:
+                        pkgdata = _toaster_load_pkgdatafile("%s/runtime-reverse/" % pkgdata_dir, pname)
+                    except IOError as err:
+                        if err.errno == 2:
+                            # We expect this e.g. for RRECOMMENDS that are unsatisfied at runtime
+                            continue
+                        else:
+                            raise
+                    allpkgs[pname] = pkgdata
 
 
     data = { 'pkgdata' : allpkgs, 'imgdata' : images, 'filedata' : files }