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 a97bafdcac..77d18a5d0c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -171,8 +171,8 @@ class BBCooker:
171 bb.debug(1, "BBCooker pyinotify1 %s" % time.time()) 171 bb.debug(1, "BBCooker pyinotify1 %s" % time.time())
172 sys.stdout.flush() 172 sys.stdout.flush()
173 173
174 self.configwatcher.bbseen = [] 174 self.configwatcher.bbseen = set()
175 self.configwatcher.bbwatchedfiles = [] 175 self.configwatcher.bbwatchedfiles = set()
176 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications) 176 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
177 bb.debug(1, "BBCooker pyinotify2 %s" % time.time()) 177 bb.debug(1, "BBCooker pyinotify2 %s" % time.time())
178 sys.stdout.flush() 178 sys.stdout.flush()
@@ -182,8 +182,8 @@ class BBCooker:
182 self.watcher = pyinotify.WatchManager() 182 self.watcher = pyinotify.WatchManager()
183 bb.debug(1, "BBCooker pyinotify3 %s" % time.time()) 183 bb.debug(1, "BBCooker pyinotify3 %s" % time.time())
184 sys.stdout.flush() 184 sys.stdout.flush()
185 self.watcher.bbseen = [] 185 self.watcher.bbseen = set()
186 self.watcher.bbwatchedfiles = [] 186 self.watcher.bbwatchedfiles = set()
187 self.notifier = pyinotify.Notifier(self.watcher, self.notifications) 187 self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
188 188
189 bb.debug(1, "BBCooker pyinotify complete %s" % time.time()) 189 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?")