Package: devscripts Version: 2.11.6 Severity: minor Tags: patch
Hi, Attached are two patches solving minor problems when using debdiff and debuild on 3.0 (git) source packages. debdiff works fine but emits spurious perl warnings. debuild also works but asks the question about the missing orig.tar.gz which is not appropriate. Cheers, Thijs
>From bf556672a555ab2b2a92f806b35f19b99ce699d6 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <[email protected]> Date: Wed, 11 Apr 2012 13:53:09 +0200 Subject: [PATCH 1/2] Do not generate warnings when debdiff'ing dpkg source format 3.0 (git). For the purposes of debdiff, the git bundle can be considered the filename of the orig tarball. This prevents warnings when @origs is later used to compare filenames of the old and new package. --- scripts/debdiff.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl index b80c945..7857836 100755 --- a/scripts/debdiff.pl +++ b/scripts/debdiff.pl @@ -500,7 +500,7 @@ elsif ($type eq 'dsc') { if ($file =~ /\.diff\.gz$/) { $diffs[$i] = cwd() . '/' . $file; } - elsif ($file =~ /(?:\.orig)?\.tar\.$compression_re_file_ext$/) { + elsif ($file =~ /((?:\.orig)?\.tar\.$compression_re_file_ext|\.git)$/) { $origs[$i] = $file; } } else { -- 1.7.2.5
>From 68bcc1b959dde9ea01df3ea7d228d63093e3bc8b Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <[email protected]> Date: Wed, 11 Apr 2012 13:57:23 +0200 Subject: [PATCH 2/2] Do not warn for missing upstream tarball if package is source format 3.0 (git). Source format 3.0 (git) does not have any upstream tarballs; everything will be in the git bundle. Therefore, debuild does not need to warn when building such a package without an upstream orig.tar.gz. --- scripts/debuild.pl | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/scripts/debuild.pl b/scripts/debuild.pl index 4dad8b7..3f2d2c6 100755 --- a/scripts/debuild.pl +++ b/scripts/debuild.pl @@ -979,6 +979,13 @@ if ($command_version eq 'dpkg') { fatal "couldn't determine host architecture!?" if ! $arch; } + # Handle dpkg source format "3.0 (git)" packages (no tarballs) + if ( -r "debian/source/format" ) { + open FMT, "debian/source/format" or die $!; + my $srcfmt = <FMT>; close FMT; chomp $srcfmt; + if ( $srcfmt eq "3.0 (git)" ) { $tgz_check = 0; } + } + $dsc = "${pkg}_${sversion}.dsc"; my $orig_prefix = "${pkg}_${uversion}.orig.tar"; my $origdir = basename(cwd()) . ".orig"; -- 1.7.2.5
