summaryrefslogtreecommitdiff
path: root/debian/patches/remove_broken_symlinks.patch
blob: 653500a50095ce4e2a7b902fb6d189a86403ed30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description:	In Clean() routine, try to delete symlinks even if files they point to are not available
Origin:		Debian
Bug-Debian:	http://bugs.debian.org/485521
Forwarded:	http://scons.tigris.org/issues/show_bug.cgi?id=2095

Index: scons-1.2.0/engine/SCons/Script/Main.py
===================================================================
--- scons-1.2.0.orig/engine/SCons/Script/Main.py	2008-12-26 17:46:29.470044569 +0100
+++ scons-1.2.0/engine/SCons/Script/Main.py	2008-12-26 17:46:40.238042348 +0100
@@ -328,6 +328,10 @@
                     # then delete dir itself
                     if remove: os.rmdir(path)
                     display("Removed directory " + pathstr)
+            else:
+                if os.path.islink(path):
+                    if remove: os.unlink(path)
+                    display("Removed " + pathstr)
         except (IOError, OSError), e:
             print "scons: Could not remove '%s':" % pathstr, e.strerror