[oe-commits] Alexandru DAMIAN : toaster.bbclass: do not fail on non-existent files

git at git.openembedded.org git at git.openembedded.org
Sat Apr 19 10:05:29 UTC 2014


Module: openembedded-core.git
Branch: daisy
Commit: 5413e56205a9f48d8c3e419d8da468c60f5aa348
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5413e56205a9f48d8c3e419d8da468c60f5aa348

Author: Alexandru DAMIAN <alexandru.damian at intel.com>
Date:   Fri Apr 11 17:40:32 2014 +0100

toaster.bbclass: do not fail on non-existent files

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 at intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/toaster.bbclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index d2fa82d..4244b2c 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -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 }



More information about the Openembedded-commits mailing list