From 21ca0b9357fd682c37f6592a4088e54ad5065aa2 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 4 Dec 2007 22:57:02 +0100 Subject: [PATCH] dpkg-genchanges: Handle source files not compressed with gzip correctly Use comp_regex from Dpkg to correctly exlucde the .orig.tar even if it is not compressed with gzip. --- ChangeLog | 4 ++++ scripts/dpkg-genchanges.pl | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fec4540b..ab6b4774 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-12-04 Frank Lichtenheld + * scripts/dpkg-genchanges.pl: Use comp_regex + from Dpkg to correctly exlucde the .orig.tar + even if it is not compressed with gzip. + * scripts/dpkg-source.pl: Move definition of @comp_supported, %comp_supported, %comp_ext, $comp_regex to... diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 2043e4ff..3135128c 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -6,7 +6,7 @@ use warnings; use POSIX; use POSIX qw(:errno_h :signal_h); use English; -use Dpkg; +use Dpkg qw(:DEFAULT :compression); use Dpkg::Gettext; use Dpkg::ErrorHandling qw(warning error failure unknown internerr syserr subprocerr usageerr); @@ -366,12 +366,13 @@ if (!$binaryonly) { } if (($sourcestyle =~ m/i/ && $sversion !~ m/-(0|1|0\.1)$/ || - $sourcestyle =~ m/d/) && - grep(m/\.diff\.gz$/,@sourcefiles)) { - $origsrcmsg= _g("not including original source code in upload"); - @sourcefiles= grep(!m/\.orig\.tar\.gz$/,@sourcefiles); + $sourcestyle =~ m/d/) && + grep(m/\.diff\.$comp_regex$/,@sourcefiles)) { + $origsrcmsg= _g("not including original source code in upload"); + @sourcefiles= grep(!m/\.orig\.tar\.$comp_regex$/,@sourcefiles); } else { - if ($sourcestyle =~ m/d/ && !grep(m/\.diff\.gz$/,@sourcefiles)) { + if ($sourcestyle =~ m/d/ && + !grep(m/\.diff\.$comp_regex$/,@sourcefiles)) { warning(_g("ignoring -sd option for native Debian package")); } $origsrcmsg= _g("including full source code in upload"); -- 2.39.5