diff options
author | Steven Knight <knight@baldmt.com> | 2003-02-22 14:18:53 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-02-22 14:18:53 (GMT) |
commit | 2a95aa36269ad195a3579382889489cc3b1bac0f (patch) | |
tree | c096f5d620f2f28b5a78f4344fa979f74f33e394 | |
parent | 531efcbc25f41d61c805133b1510baf29570d985 (diff) | |
download | SCons-2a95aa36269ad195a3579382889489cc3b1bac0f.zip SCons-2a95aa36269ad195a3579382889489cc3b1bac0f.tar.gz SCons-2a95aa36269ad195a3579382889489cc3b1bac0f.tar.bz2 |
Fix Install test portability by converting an OSError when we prepare a target file by unlinking it into a BuildError.
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Node/FS.py | 6 | ||||
-rw-r--r-- | test/Install.py | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 9fa0501..6470800 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -25,6 +25,9 @@ RELEASE 0.12 - XXX - Make the internal to_String() function more efficient. + - Make the error message the same as other build errors when there's a + problem unlinking a target file in preparation for it being built. + RELEASE 0.11 - Tue, 11 Feb 2003 05:24:33 -0600 diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index e2378b1..8d5a45f 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -1044,7 +1044,11 @@ class File(Entry): if self.exists(): if self.has_builder() and not self.precious: - Unlink(self, None, None) + try: + Unlink(self, None, None) + except OSError, e: + raise SCons.Errors.BuildError(node = self, + errstr = e.strerror) if hasattr(self, '_exists'): delattr(self, '_exists') else: diff --git a/test/Install.py b/test/Install.py index 629c136..f69c954 100644 --- a/test/Install.py +++ b/test/Install.py @@ -103,7 +103,7 @@ os.chmod(test.workpath('export'), 0555) f = open(f1_out, 'rb') test.run(arguments = f1_out, - stderr="scons: *** [Errno 13] Permission denied: '%s'\n" % os.path.join('export', 'f1.out'), + stderr="scons: *** [%s] Permission denied\n" % os.path.join('export', 'f1.out'), status=2) f.close() |