summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/monitordisk.py
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-02-17 17:09:34 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-21 23:37:26 +0000
commit4f77505d94a8f6260933f457e9848d1d2fa98ce5 (patch)
tree89d4bbbf29d4d824e65c93754c9522993c5a3290 /bitbake/lib/bb/monitordisk.py
parent424269caeadd21b01a860d032ca81167c7ce7239 (diff)
downloadpoky-4f77505d94a8f6260933f457e9848d1d2fa98ce5.tar.gz
bitbake: lib/bb: Replace "ABORT" action in BB_DISKMON_DIRS
In line with the inclusive language migration defined at: https://wiki.yoctoproject.org/wiki/Inclusive_language replace the "ABORT" action in BB_DISKMON_DIRS entries with "HALT". In order to ease migration, code has been added to warn users to update their configurations if the old name is used, as opposed to to throwing an error. (Bitbake rev: 11dc65dc077398ff9818060769c99c0090291186) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/monitordisk.py')
-rw-r--r--bitbake/lib/bb/monitordisk.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/bitbake/lib/bb/monitordisk.py b/bitbake/lib/bb/monitordisk.py
index 98f2109ed2..8d8cfbb937 100644
--- a/bitbake/lib/bb/monitordisk.py
+++ b/bitbake/lib/bb/monitordisk.py
@@ -76,7 +76,12 @@ def getDiskData(BBDirs):
76 return None 76 return None
77 77
78 action = pathSpaceInodeRe.group(1) 78 action = pathSpaceInodeRe.group(1)
79 if action not in ("ABORT", "STOPTASKS", "WARN"): 79 if action == "ABORT":
80 # Emit a deprecation warning
81 logger.warnonce("The BB_DISKMON_DIRS \"ABORT\" action has been been renamed to \"HALT\", update configuration")
82 action = "HALT"
83
84 if action not in ("HALT", "STOPTASKS", "WARN"):
80 printErr("Unknown disk space monitor action: %s" % action) 85 printErr("Unknown disk space monitor action: %s" % action)
81 return None 86 return None
82 87
@@ -177,7 +182,7 @@ class diskMonitor:
177 # use them to avoid printing too many warning messages 182 # use them to avoid printing too many warning messages
178 self.preFreeS = {} 183 self.preFreeS = {}
179 self.preFreeI = {} 184 self.preFreeI = {}
180 # This is for STOPTASKS and ABORT, to avoid printing the message 185 # This is for STOPTASKS and HALT, to avoid printing the message
181 # repeatedly while waiting for the tasks to finish 186 # repeatedly while waiting for the tasks to finish
182 self.checked = {} 187 self.checked = {}
183 for k in self.devDict: 188 for k in self.devDict:
@@ -219,8 +224,8 @@ class diskMonitor:
219 self.checked[k] = True 224 self.checked[k] = True
220 rq.finish_runqueue(False) 225 rq.finish_runqueue(False)
221 bb.event.fire(bb.event.DiskFull(dev, 'disk', freeSpace, path), self.configuration) 226 bb.event.fire(bb.event.DiskFull(dev, 'disk', freeSpace, path), self.configuration)
222 elif action == "ABORT" and not self.checked[k]: 227 elif action == "HALT" and not self.checked[k]:
223 logger.error("Immediately abort since the disk space monitor action is \"ABORT\"!") 228 logger.error("Immediately halt since the disk space monitor action is \"HALT\"!")
224 self.checked[k] = True 229 self.checked[k] = True
225 rq.finish_runqueue(True) 230 rq.finish_runqueue(True)
226 bb.event.fire(bb.event.DiskFull(dev, 'disk', freeSpace, path), self.configuration) 231 bb.event.fire(bb.event.DiskFull(dev, 'disk', freeSpace, path), self.configuration)
@@ -245,8 +250,8 @@ class diskMonitor:
245 self.checked[k] = True 250 self.checked[k] = True
246 rq.finish_runqueue(False) 251 rq.finish_runqueue(False)
247 bb.event.fire(bb.event.DiskFull(dev, 'inode', freeInode, path), self.configuration) 252 bb.event.fire(bb.event.DiskFull(dev, 'inode', freeInode, path), self.configuration)
248 elif action == "ABORT" and not self.checked[k]: 253 elif action == "HALT" and not self.checked[k]:
249 logger.error("Immediately abort since the disk space monitor action is \"ABORT\"!") 254 logger.error("Immediately halt since the disk space monitor action is \"HALT\"!")
250 self.checked[k] = True 255 self.checked[k] = True
251 rq.finish_runqueue(True) 256 rq.finish_runqueue(True)
252 bb.event.fire(bb.event.DiskFull(dev, 'inode', freeInode, path), self.configuration) 257 bb.event.fire(bb.event.DiskFull(dev, 'inode', freeInode, path), self.configuration)