From 6541ca1d9fd39d306795b305d1e4fdef5573b218 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Fri, 27 Nov 2009 17:14:40 +0000 Subject: Remove stale files created by SCons when building Debian packages --- debian/changelog | 10 ++++++++++ debian/patches/remove_stale_files.patch | 31 +++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 42 insertions(+) create mode 100644 debian/patches/remove_stale_files.patch diff --git a/debian/changelog b/debian/changelog index d0ff20e..ccd9aca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +scons (1.2.0.d20090905-2) UNRELEASED; urgency=low + + * debian/patches/remove_stale_files.patch: + - Remove stale files created by SCons when building Debian packages. + Check if DEB_BUILD_ARCH_OS is set, then delete selected files. This + is a workaround to fix double compilation, it will reverted when + upstream implements support for deep clean (Closes: #519948). + + -- Luca Falavigna Fri, 27 Nov 2009 17:56:09 +0100 + scons (1.2.0.d20090905-1) unstable; urgency=low * New upstream checkpoint release. diff --git a/debian/patches/remove_stale_files.patch b/debian/patches/remove_stale_files.patch new file mode 100644 index 0000000..9d776f0 --- /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: scons-1.2.0.d20090905/engine/SCons/Script/Main.py +=================================================================== +--- scons-1.2.0.d20090905.orig/engine/SCons/Script/Main.py 2009-11-27 16:51:58.000000000 +0000 ++++ scons-1.2.0.d20090905/engine/SCons/Script/Main.py 2009-11-27 16:51:53.000000000 +0000 +@@ -1022,6 +1022,21 @@ + if not nodes: + exit_status = 2 + ++ # Remove temporary files left by SCons ++ if options.clean: ++ if os.getenv('DEB_BUILD_ARCH_OS'): ++ 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 diff --git a/debian/patches/series b/debian/patches/series index b2967a5..4dc5402 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ java_ignore_nonexistent_files.patch +remove_stale_files.patch -- cgit v1.2.3