[SCM] Git repository for devscripts branch, master, updated. v2.11.9-5-g7916b29
James McCoy
jamessan at debian.org
Fri Jun 29 03:27:59 UTC 2012
The following commit has been merged in the master branch:
commit 7916b29ea72b640e3df4e77a0a5fa9998419fbcc
Author: James McCoy <jamessan at debian.org>
Date: Thu Jun 28 23:17:46 2012 -0400
uscan: Properly use the File::Temp interface when repacking
When File::Temp's tempfile is called in scalar context, it simply returns a
file handle (glob). This was being passed as the to_file/from_file argument
to Dpkg::IPC's spawn function, which gladly stringified the glob into
something like GLOB(0x...) and used that as the filename.
While this didn't directly affect the main functionality of repacking, it
meant the intended temp file wasn't being used and, more importantly, the
actual file wasn't being cleaned up.
Closes: #678193
Signed-off-by: James McCoy <jamessan at debian.org>
diff --git a/debian/changelog b/debian/changelog
index 539295e..3710d6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ devscripts (2.11.10) UNRELEASED; urgency=low
* build-rdeps, chdist, debsnap, dpkg-depcheck, rc-alert: Exit when unknown
options are provided. (Closes: #679374)
* dscverify: Use GetOptions to handle argument parsing. (Closes: #679148)
+ * uscan: Properly use the File::Temp interface so files aren't being created
+ with the stringified version of a file glob. (Closes: #678193)
-- Benjamin Drung <bdrung at debian.org> Sun, 17 Jun 2012 23:33:41 +0200
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index df4fea9..8723fb4 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -1354,7 +1354,7 @@ EOF
if ($repack and $newfile_base =~ /^(.*)\.(tar\.bz2|tbz2?)$/) {
print "-- Repacking from bzip2 to gzip\n" if $verbose;
my $newfile_base_gz = "$1.tar.gz";
- my $fname = tempfile(UNLINK => 1);
+ my (undef, $fname) = tempfile(UNLINK => 1);
spawn(exec => ['bunzip2', '-c', "$destdir/$newfile_base"],
to_file => $fname,
wait_child => 1);
@@ -1369,7 +1369,7 @@ EOF
if ($repack and $newfile_base =~ /^(.*)\.(tar\.lzma|tlz(?:ma?)?)$/) {
print "-- Repacking from lzma to gzip\n" if $verbose;
my $newfile_base_gz = "$1.tar.gz";
- my $fname = tempfile(UNLINK => 1);
+ my (undef, $fname) = tempfile(UNLINK => 1);
spawn(exec => ['xz', '-F', 'lzma', '-cd', "$destdir/$newfile_base"],
to_file => $fname,
wait_child => 1);
@@ -1384,7 +1384,7 @@ EOF
if ($repack and $newfile_base =~ /^(.*)\.(tar\.xz|txz)$/) {
print "-- Repacking from xz to gzip\n" if $verbose;
my $newfile_base_gz = "$1.tar.gz";
- my $fname = tempfile(UNLINK => 1);
+ my (undef, $fname) = tempfile(UNLINK => 1);
spawn(exec => ['xz', '-cd', "$destdir/$newfile_base"],
to_file => $fname,
wait_child => 1);
--
Git repository for devscripts
More information about the devscripts-devel
mailing list