summaryrefslogtreecommitdiff
path: root/debian/patches/remove_broken_symlinks.patch
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@ubuntu.com>2009-08-01 20:52:02 +0200
committerLuca Falavigna <dktrkranz@ubuntu.com>2009-08-01 20:52:02 +0200
commit4ef312e07bb9c774a89eb4b755feabfc151351a8 (patch)
treecbe5eac71a0b94ad96ac1dcbf21e5189a1555a10 /debian/patches/remove_broken_symlinks.patch
parent51ed09d22b333546228172433dcc41af1ea02645 (diff)
Adhere to DEP3
Diffstat (limited to 'debian/patches/remove_broken_symlinks.patch')
-rw-r--r--debian/patches/remove_broken_symlinks.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/patches/remove_broken_symlinks.patch b/debian/patches/remove_broken_symlinks.patch
new file mode 100644
index 0000000..653500a
--- /dev/null
+++ b/debian/patches/remove_broken_symlinks.patch
@@ -0,0 +1,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
+