summaryrefslogtreecommitdiff
path: root/debian/patches/remove_stale_files.patch
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-08-25 15:02:04 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-08-25 15:02:04 +0200
commit83370576d74c932cde854cb251bfff6b06ab45ec (patch)
tree71a48f93597a9b5972dd42ca5bd07eeaf3747488 /debian/patches/remove_stale_files.patch
parent99469e37d07b9f326c5b2c8157566f2f512cdc56 (diff)
last 2.3.2-1
Diffstat (limited to 'debian/patches/remove_stale_files.patch')
-rw-r--r--debian/patches/remove_stale_files.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/remove_stale_files.patch b/debian/patches/remove_stale_files.patch
new file mode 100644
index 0000000..1422d91
--- /dev/null
+++ b/debian/patches/remove_stale_files.patch
@@ -0,0 +1,31 @@
+Description: Remove stale files created by SCons when building Debian packages
+Origin: Debian
+Bug-Debian: http://bugs.debian.org/519948
+Forwarded: http://scons.tigris.org/issues/show_bug.cgi?id=1571
+
+Index: b/engine/SCons/Script/Main.py
+===================================================================
+--- a/engine/SCons/Script/Main.py 2010-01-23 15:11:19.624932557 +0100
++++ b/engine/SCons/Script/Main.py 2010-01-23 15:11:35.084931903 +0100
+@@ -1087,6 +1087,21 @@
+ print 'Found nothing to build'
+ exit_status = 2
+
++ # Remove temporary files left by SCons
++ if options.clean:
++ if os.environ.has_key('DH_INTERNAL_OPTIONS'):
++ import shutil
++ for path in ('.sconsign.dblite', '.sconf_temp'):
++ try:
++ if os.path.isfile(path):
++ print 'Removing autogenerated file %s' % path
++ os.remove(path)
++ if os.path.isdir(path):
++ print 'Removing autogenerated directory %s' % path
++ shutil.rmtree(path)
++ except OSError:
++ pass
++
+ def _build_targets(fs, options, targets, target_top):
+
+ global this_build_status