[OE-core] [PATCH 1/1] sstate.bbclass: check before open the manifest

Robert Yang liezhi.yang at windriver.com
Thu Aug 29 13:13:34 UTC 2013


The python stack trace would be printed if we:

$ bitbake make (the make-3.82 will be built)
// Edit make.inc
$ bitbake make-3.81
[snip]
 *** 0004:    mfile = open(manifest)
     0005:    entries = mfile.readlines()
     0006:    mfile.close()
     0007:
     0008:    for entry in entries:
Exception: IOError: [Errno 2] No such file or directory: xxx
[snip]

This because the make-3.81 and make-3.82 are being built at the same
time, the manifest may have been removed by make-3.82, but make-3.81
still opens it, so the error happens.

Check before open the manifest would fix the problem.

[YOCTO #5067]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/classes/sstate.bbclass |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index c86f393..6e71086 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -302,6 +302,9 @@ def sstate_clean_cachefiles(d):
 def sstate_clean_manifest(manifest, d):
     import oe.path
 
+    if not os.path.exists(manifest):
+        return True
+
     mfile = open(manifest)
     entries = mfile.readlines()
     mfile.close()
-- 
1.7.10.4




More information about the Openembedded-core mailing list