[Scons-users] --dry-run can still remove files - is this a bug?
chris warth
cswarth at gmail.com
Wed Aug 5 14:40:43 EDT 2015
Despite using the "No execute" options (-n, --just-print, --dry-run,
--recon), scons can delete files in the build directory. --dry-run
should not modify the filesystem - that's the point of having a
--dry-run option.
Note that this behavior can be worked-around by setting 'duplicate=0'
in the call to env.VariantDir(), but that's not really fixing
--dry-run.
To reproduce (on ubuntu linux), copy the attached file to SConstruct.error
$ mkdir output
$ >output/source.txt
$ ~/scons/bin/scons --dry-run --debug=duplicate -f SConstruct.error
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
dup: no src for output/source.txt, unlinking old variant copy
scons: building associated VariantDir targets: output
scons: *** [output/target.txt] Source `output/source.txt' not found,
needed by target `output/target.txt'.
scons: building terminated because of errors.
$ ~/scons/bin/scons --version
SCons by Steven Knight et al.:
script: v2.3.6.rel_2.3.5:3347:d31d5a4e74b6[MODIFIED],
2015/07/31 14:36:10, by bdbaddog on hpmicrodog
engine: v2.3.6.rel_2.3.5:3347:d31d5a4e74b6[MODIFIED],
2015/07/31 14:36:10, by bdbaddog on hpmicrodog
engine path: ['/home/cwarth/scons/lib/scons-2.3.6/SCons']
Copyright (c) 2001 - 2015 The SCons Foundation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150805/ea9a4fdf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConstruct.error
Type: application/octet-stream
Size: 221 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150805/ea9a4fdf/attachment.obj>
More information about the Scons-users
mailing list