function, use its strfunction() method (if any) to display the
action.
+ - Fix handling when BuildDir() exists but is unwriteable. Add
+ "Stop." to those error messages for consistency.
+
From Christoph Wiedemann:
- Add an Environment.SetDefault() method that only sets values if
try:
Link(self, src, None)
except SCons.Errors.BuildError, e:
- desc = "Cannot duplicate `%s' in `%s': %s." % (src, self.dir, e.errstr)
+ desc = "Cannot duplicate `%s' in `%s': %s." % (src.path, self.dir.path, e.errstr)
raise SCons.Errors.StopError, desc
self.linked = 1
# The Link() action may or may not have actually
# couldn't be copied in to the BuildDir. Since we're just
# reading SConscript files and haven't started building
# things yet, stop regardless of whether they used -i or -k
- # or anything else, but don't say "Stop." on the message.
+ # or anything else.
global exit_status
- sys.stderr.write("scons: *** %s\n" % e)
+ sys.stderr.write("scons: *** %s Stop.\n" % e)
exit_status = 2
sys.exit(exit_status)
global sconscript_time
env = Environment(BUILDERS={'Build':Builder(action=cat)},
SCANNERS=[Scanner(fake_scan, skeys = ['.in'])])
+
+# Do some Node test operations to ensure no side-effects cause failures
+File('file.in').exists()
+File('file.in').is_derived()
+File('file.in').is_pseudo_derived()
+
env.Build('file.out', 'file.in')
""")
test.run(chdir = 'ro-dir',
arguments = ".",
status = 2,
- stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied.\n" % os.path.join('src', 'SConscript'))
+ stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied. Stop.\n" % os.path.join('src', 'SConscript'))
# Verify the error when the SConscript file within the BuildDir is
# read-only. Note that we have to make the directory read-only too,
test.run(chdir = 'ro-SConscript',
arguments = ".",
status = 2,
- stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied.\n" % os.path.join('src', 'SConscript'))
+ stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied. Stop.\n" % os.path.join('src', 'SConscript'))
os.chmod('ro-SConscript', os.stat('ro-SConscript')[stat.ST_MODE] | stat.S_IWUSR)
f.close()
test.run(chdir = 'ro-SConscript',
arguments = ".",
status = 2,
- stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied.\n" % os.path.join('src', 'SConscript'))
+ stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied. Stop.\n" % os.path.join('src', 'SConscript'))
# Verify the error when the source file within the BuildDir is
# read-only. Note that we have to make the directory read-only too,
arguments = "-k .",
status = 2,
stderr = """\
-scons: *** Cannot duplicate `%s' in `build': Permission denied.
+scons: *** Cannot duplicate `%s' in `build': Permission denied. Stop.
""" % (os.path.join('src', 'file.in')))
f.close()