Description
This issue was originally created at: 2009-08-30 14:04:46.
This issue was reported by: asomers
.
asomers said at 2009-08-30 14:04:46
using
env.AlwaysBuild
on a target file created byInstall()
has no effect. If the target file is created byInstallAs()
, thenAlwaysBuild
works normally.How to reproduce:
Step 1:
Create a new directory with this SConstruct:
env = Environment()
dest = env.Dir('destdir')
env.Command(dest, [], 'mkdir -p $TARGET; echo $RANDOM > $TARGET/destfile')
env.AlwaysBuild(dest)
env.Install('instdir', dest)
Depends('instdir', dest)
env.AlwaysBuild('instdir')
env.InstallAs('instfile', 'destdir/destfile')
Depends('instfile', dest)
env.AlwaysBuild('instfile')
- run scons
It will produce this error, which might be the same as Issue Install() race condition #2124:
mkdir -p destdir; echo > destdir/destfile
scons: *** [instdir/destdir] Implicit dependency `destdir/destfile' not found, needed by target `instdir/destdir'.
run scons again
It will install both instdir and instfile, as it shouldrun scons a third time
Only instfile will be reinstalled. Instdir will not be reinstalled, though it should be.I have tested this using scons version v1.2.0.r3842 on Ubuntu 9.04 x86_64 and Gentoo x86_64.
asomers said at 2009-08-30 14:14:17
Update: I have tested this on Gentoo using scons v1.2.0.r3842 and pythons 2.4, 2.5, and 2.6 . I get the same result with all python versions.
I have tested it with python 2.6 and scons v1.0.0 and get the same result.
With scons v0.97.D001 and python-2.6. I get a traceback unless I modify
SConstruct as shown:
env = Environment()
dest = env.Dir('destdir')
env.Command(dest, [], 'mkdir -p $TARGET; echo $RANDOM > $TARGET/destfile')
env.AlwaysBuild(dest)
instdir = Dir('instdir')
env.Install(instdir, dest)
Depends(instdir, dest)
env.AlwaysBuild(instdir)
env.InstallAs('instfile', 'destdir/destfile')
Depends('instfile', dest)
env.AlwaysBuild('instfile')
With that SConstruct, I do not have the race condition bug, but I still see that instdir is not rebuilt as it should be.
With python-2.6, scons v1.2.0.r3842, and the modified SConstruct, I see both errors as I did with the original SConstruct.
gregnoel said at 2009-12-16 09:33:07
Bug party triage. Greg to research to see if it's the known problem with using a directory as a target (and hence a case of SEP0001).
gregnoel said at 2010-07-21 17:00:30
Bug party triage. Bump the priority of this issue.
garyo said at 2012-09-01 10:04:01
de-assigning all tickets assigned to Greg Noel (no longer working on SCons)