summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cooker.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index d065b4dc4e..95f65ac685 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -122,11 +122,13 @@ class BBCooker:
122 self.configuration = configuration 122 self.configuration = configuration
123 123
124 self.configwatcher = pyinotify.WatchManager() 124 self.configwatcher = pyinotify.WatchManager()
125 self.configwatcher.bbseen = []
125 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications) 126 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
126 self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \ 127 self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \
127 pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \ 128 pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \
128 pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO 129 pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
129 self.watcher = pyinotify.WatchManager() 130 self.watcher = pyinotify.WatchManager()
131 self.watcher.bbseen = []
130 self.notifier = pyinotify.Notifier(self.watcher, self.notifications) 132 self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
131 133
132 134
@@ -181,6 +183,9 @@ class BBCooker:
181 watcher = self.watcher 183 watcher = self.watcher
182 for i in deps: 184 for i in deps:
183 f = i[0] 185 f = i[0]
186 if f in watcher.bbseen:
187 continue
188 watcher.bbseen.append(f)
184 while True: 189 while True:
185 # We try and add watches for files that don't exist but if they did, would influence 190 # We try and add watches for files that don't exist but if they did, would influence
186 # the parser. The parent directory of these files may not exist, in which case we need 191 # the parser. The parent directory of these files may not exist, in which case we need
@@ -191,6 +196,7 @@ class BBCooker:
191 except pyinotify.WatchManagerError as e: 196 except pyinotify.WatchManagerError as e:
192 if 'ENOENT' in str(e): 197 if 'ENOENT' in str(e):
193 f = os.path.dirname(f) 198 f = os.path.dirname(f)
199 watcher.bbseen.append(f)
194 continue 200 continue
195 raise 201 raise
196 202