summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index e6442bff93..b74affa7ec 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -169,8 +169,8 @@ class BBCooker:
169 bb.debug(1, "BBCooker pyinotify1 %s" % time.time()) 169 bb.debug(1, "BBCooker pyinotify1 %s" % time.time())
170 sys.stdout.flush() 170 sys.stdout.flush()
171 171
172 self.configwatcher.bbseen = [] 172 self.configwatcher.bbseen = set()
173 self.configwatcher.bbwatchedfiles = [] 173 self.configwatcher.bbwatchedfiles = set()
174 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications) 174 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
175 bb.debug(1, "BBCooker pyinotify2 %s" % time.time()) 175 bb.debug(1, "BBCooker pyinotify2 %s" % time.time())
176 sys.stdout.flush() 176 sys.stdout.flush()
@@ -180,8 +180,8 @@ class BBCooker:
180 self.watcher = pyinotify.WatchManager() 180 self.watcher = pyinotify.WatchManager()
181 bb.debug(1, "BBCooker pyinotify3 %s" % time.time()) 181 bb.debug(1, "BBCooker pyinotify3 %s" % time.time())
182 sys.stdout.flush() 182 sys.stdout.flush()
183 self.watcher.bbseen = [] 183 self.watcher.bbseen = set()
184 self.watcher.bbwatchedfiles = [] 184 self.watcher.bbwatchedfiles = set()
185 self.notifier = pyinotify.Notifier(self.watcher, self.notifications) 185 self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
186 186
187 bb.debug(1, "BBCooker pyinotify complete %s" % time.time()) 187 bb.debug(1, "BBCooker pyinotify complete %s" % time.time())
@@ -278,14 +278,14 @@ class BBCooker:
278 if not watcher: 278 if not watcher:
279 watcher = self.watcher 279 watcher = self.watcher
280 for i in deps: 280 for i in deps:
281 watcher.bbwatchedfiles.append(i[0]) 281 watcher.bbwatchedfiles.add(i[0])
282 if dirs: 282 if dirs:
283 f = i[0] 283 f = i[0]
284 else: 284 else:
285 f = os.path.dirname(i[0]) 285 f = os.path.dirname(i[0])
286 if f in watcher.bbseen: 286 if f in watcher.bbseen:
287 continue 287 continue
288 watcher.bbseen.append(f) 288 watcher.bbseen.add(f)
289 watchtarget = None 289 watchtarget = None
290 while True: 290 while True:
291 # We try and add watches for files that don't exist but if they did, would influence 291 # We try and add watches for files that don't exist but if they did, would influence
@@ -294,7 +294,7 @@ class BBCooker:
294 try: 294 try:
295 watcher.add_watch(f, self.watchmask, quiet=False) 295 watcher.add_watch(f, self.watchmask, quiet=False)
296 if watchtarget: 296 if watchtarget:
297 watcher.bbwatchedfiles.append(watchtarget) 297 watcher.bbwatchedfiles.add(watchtarget)
298 break 298 break
299 except pyinotify.WatchManagerError as e: 299 except pyinotify.WatchManagerError as e:
300 if 'ENOENT' in str(e): 300 if 'ENOENT' in str(e):
@@ -302,7 +302,7 @@ class BBCooker:
302 f = os.path.dirname(f) 302 f = os.path.dirname(f)
303 if f in watcher.bbseen: 303 if f in watcher.bbseen:
304 break 304 break
305 watcher.bbseen.append(f) 305 watcher.bbseen.add(f)
306 continue 306 continue
307 if 'ENOSPC' in str(e): 307 if 'ENOSPC' in str(e):
308 providerlog.error("No space left on device or exceeds fs.inotify.max_user_watches?") 308 providerlog.error("No space left on device or exceeds fs.inotify.max_user_watches?")