[SCM] Git repository for devscripts branch, master, updated. v2.12.3-4-g9d6fb35

James McCoy jamessan at debian.org
Mon Sep 17 02:37:21 UTC 2012


The following commit has been merged in the master branch:
commit 5f99b3042fb177e338ab540259e6ea0cf93d9718
Author: James McCoy <jamessan at debian.org>
Date:   Sat Sep 15 18:22:07 2012 -0400

    interdiff: Set $TMPDIR when running interdiff so its temp files get cleaned up on exit.
    
    Signed-off-by: James McCoy <jamessan at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 3bfb006..436b4e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ devscripts (2.12.4) UNRELEASED; urgency=low
 
   * dget: Avoid an infinite loop when a .changes/.dsc file references itself.
     (Closes: #687670)
+  * interdiff:
+    + Set $TMPDIR when running interdiff so its temp files get cleaned up on
+      exit.
 
  -- James McCoy <jamessan at debian.org>  Sat, 15 Sep 2012 16:26:28 -0400
 
diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl
index 20a0ced..634f4db 100755
--- a/scripts/debdiff.pl
+++ b/scripts/debdiff.pl
@@ -21,6 +21,7 @@ use Dpkg::IPC;
 use Dpkg::Compression;
 use File::Copy qw(cp move);
 use File::Basename;
+use File::Spec;
 use File::Path qw/ rmtree /;
 use File::Temp qw/ tempdir tempfile /;
 use lib '/usr/share/devscripts';
@@ -544,9 +545,13 @@ elsif ($type eq 'dsc') {
 	and scalar(@excludes) == 0 and $use_interdiff and !$wdiff_source_control) {
 	# same orig tar ball, interdiff exists and not wdiffing
 
+	my $tmpdir = tempdir(CLEANUP => 1);
 	spawn(exec => ['interdiff', '-z', @diff_opts, $diffs[1], $diffs[2]],
 	      to_file => $filename,
-	      wait_child => 1);
+	      wait_child => 1,
+	      # Make interdiff put its tempfiles in $tmpdir, so they're
+	      # automatically cleaned up
+	      env => { TMPDIR => $tmpdir });
 	if ($have_diffstat and $show_diffstat) {
 	    my $header = "diffstat for " . basename($diffs[1])
 			    . " " . basename($diffs[2]) . "\n\n";

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list