[bitbake-devel] [PATCH 1/1] cooker.py: trap the ENOSPC error and translate it

Robert Yang liezhi.yang at windriver.com
Tue Jan 20 07:29:16 UTC 2015


Trap the ENOSPC error and translate it into a human readable error
message, which is good for debugging.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 bitbake/lib/bb/cooker.py |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 95f65ac..011f069 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -198,6 +198,11 @@ class BBCooker:
                         f = os.path.dirname(f)
                         watcher.bbseen.append(f)
                         continue
+                    if 'ENOSPC' in str(e):
+                        providerlog.error("No space left on device or exceeds fs.inotify.max_user_watches?")
+                        providerlog.error("To check max_user_watches: sysctl -n fs.inotify.max_user_watches.")
+                        providerlog.error("To modify max_user_watches: sysctl -n -w fs.inotify.max_user_watches=<value>.")
+                        providerlog.error("Root privilege is required to modify max_user_watches.")
                     raise
 
     def sigterm_exception(self, signum, stackframe):
-- 
1.7.9.5




More information about the bitbake-devel mailing list