Преглед изворни кода

dpkg-buildpackage/dpkg-genchanges: handle .debian.tar.gz files too

* scripts/dpkg-buildpackage.pl, scripts/dpkg-genchanges.pl: Treat
debian.tar.gz files (used by 3.0 (quilt) source packages) like diff.gz
files when it comes to detection of the kind of upload.
Raphael Hertzog пре 18 година
родитељ
комит
de193419c8
4 измењених фајлова са 13 додато и 5 уклоњено
  1. 6 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 3 3
      scripts/dpkg-buildpackage.pl
  4. 2 2
      scripts/dpkg-genchanges.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-06-21  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-buildpackage.pl, scripts/dpkg-genchanges.pl: Treat
+	debian.tar.gz files (used by 3.0 (quilt) source packages) like
+	diff.gz files when it comes to detection of the kind of upload.
+
 2008-06-21  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Source/Package/V3/quilt.pm: Define QUILT_SERIES

+ 2 - 0
debian/changelog

@@ -3,6 +3,8 @@ dpkg (1.14.21) UNRELEASED; urgency=low
   [ Raphael Hertzog ]
   * Small fix in "3.0 (quilt)" source format when using non-standard name
     of the quilt series.
+  * Handle debian.tar.gz files like diff.gz in dpkg-buildpackage and
+    dpkg-genchanges to detect the kind of upload.
 
  -- Raphael Hertzog <hertzog@debian.org>  Wed, 18 Jun 2008 10:19:51 +0200
 

+ 3 - 3
scripts/dpkg-buildpackage.pl

@@ -414,10 +414,10 @@ close CHANGES or subprocerr(_g('dpkg-genchanges'));
 close OUT or syserr(_g('write changes file'));
 
 my $srcmsg;
-sub fileomitted { return $files !~ /$_[0]/ }
+sub fileomitted($) { return $files !~ /$_[0]/ }
 if (fileomitted '\.deb') {
     # source only upload
-    if (fileomitted "\.diff\.$comp_regex") {
+    if (fileomitted "\.diff\.$comp_regex" and fileomitted "\.debian\.tar\.$comp_regex") {
 	$srcmsg = _g('source only upload: Debian-native package');
     } elsif (fileomitted "\.orig\.tar\.$comp_regex") {
 	$srcmsg = _g('source only, diff-only upload (original source NOT included)');
@@ -428,7 +428,7 @@ if (fileomitted '\.deb') {
     $srcmsg = _g('full upload (original source is included)');
     if (fileomitted '\.dsc') {
 	$srcmsg = _g('binary only upload (no source included)');
-    } elsif (fileomitted "\.diff\.$comp_regex") {
+    } elsif (fileomitted "\.diff\.$comp_regex" and fileomitted "\.debian\.tar\.$comp_regex") {
 	$srcmsg = _g('full upload; Debian-native package (full source is included)');
     } elsif (fileomitted "\.orig\.tar\.$comp_regex") {
 	$srcmsg = _g('binary and diff upload (original source NOT included)');

+ 2 - 2
scripts/dpkg-genchanges.pl

@@ -453,12 +453,12 @@ if (!is_binaryonly) {
 
     if ((($sourcestyle =~ m/i/ && not($include_tarball)) ||
 	 $sourcestyle =~ m/d/) &&
-	grep(m/\.diff\.$comp_regex$/,@sourcefiles)) {
+	grep(m/\.(debian\.tar|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\.$comp_regex$/,@sourcefiles)) {
+	    !grep(m/\.(debian\.tar|diff)\.$comp_regex$/,@sourcefiles)) {
 	    warning(_g("ignoring -sd option for native Debian package"));
 	}
         $origsrcmsg= _g("including full source code in upload");