[rtems commit] build: Improve cache handling
Sebastian Huber
sebh at rtems.org
Wed Oct 28 06:33:50 UTC 2020
Module: rtems
Branch: master
Commit: eebad5ffcd6713f49c0e629c05bb1fd14fb98a38
Changeset: http://git.rtems.org/rtems/commit/?id=eebad5ffcd6713f49c0e629c05bb1fd14fb98a38
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Oct 28 06:36:28 2020 +0100
build: Improve cache handling
Check the directory modification time to notice file removals.
---
wscript | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/wscript b/wscript
index 432d705..57ec6ff 100755
--- a/wscript
+++ b/wscript
@@ -1090,9 +1090,12 @@ class BuildItemContext(object):
def is_one_item_newer(ctx, path, mtime):
try:
+ mtime2 = os.path.getmtime(path)
+ if mtime <= mtime2:
+ return True
names = os.listdir(path)
except Exception as e:
- ctx.fatal("Cannot list build specification directory: {}".format(e))
+ ctx.fatal("Cannot access build specification directory: {}".format(e))
for name in names:
path2 = os.path.join(path, name)
if name.endswith(".yml") and not name.startswith("."):
More information about the vc
mailing list