Fix Install test portability by converting an OSError when we prepare a target file...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 22 Feb 2003 14:18:53 +0000 (14:18 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 22 Feb 2003 14:18:53 +0000 (14:18 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@596 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Node/FS.py
test/Install.py

index 9fa0501d5404715e50d81c5d930869d9012bcd08..64708001634914a65e4f8341bf96fe6a8d2b1af6 100644 (file)
@@ -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
index e2378b165ed29b436f6692c07796f65f5ba0529e..8d5a45f3127e3e13d415be6dcda5a6ce591d4582 100644 (file)
@@ -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:
index 629c136cd7beb5aa4679c667f39deb5008c63336..f69c954b195d998260e23ccfb838176b38e29c1e 100644 (file)
@@ -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()