Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: sconsUtils
-
Labels:
-
Team:Architecture
Description
If you run "scons -c" in a directory tree with a directory named "core", it will delete that directory. Found that out when inside "daf_butler", which has directory named python/lsst/daf/butler/core, and it deleted the directory and the code below it.
It looks to me like the cleanExt option in sconsUtils is only ever None (I don't see it overridden anywhere), which means we only get the default file list in scripts.py:114. Given this, we could probably put a little logic about "core" in builders.CleanTree() (which is the only thing that takes cleanExt) to make the recurse option a bit smarter.
I may have been the cause of this with
DM-14124. Which suggests a possibly simple solution: two separate runs of CleanTree(), the first with the "standard" list of things to remove and without -prune, the second with any known directories (e.g. .cache) and with -prune.