From: Alexandru DAMIAN Date: Fri, 11 Apr 2014 16:40:32 +0000 (+0100) Subject: toaster.bbclass: do not fail on non-existent files X-Git-Tag: 2015-4~3074 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=6bc4a0311cc3cd3f696d9dbca8fc0ef4e3bc340b;p=openembedded-core.git 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 Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index d2fa82d730..4244b2ca7f 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 }