소스 검색

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.
Frank Lichtenheld 18 년 전
부모
커밋
21ca0b9357
2개의 변경된 파일11개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 0
      ChangeLog
  2. 7 6
      scripts/dpkg-genchanges.pl

+ 4 - 0
ChangeLog

@@ -1,5 +1,9 @@
 2007-12-04  Frank Lichtenheld  <djpig@debian.org>
 
+	* 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...

+ 7 - 6
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");