]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker.py: trap the ENOSPC error and translate it
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 20 Jan 2015 07:29:16 +0000 (23:29 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Jan 2015 11:36:27 +0000 (11:36 +0000)
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@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 554dfbd24d1d1f447fbfeda153e6d560c144294d..d9b200e129d82b74a29ba3190870e0bb814694aa 100644 (file)
@@ -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):