The following commit has been merged in the lenny branch:
commit dd860985ee919f02e820e7b26f5f21420edc0bd1
Author: Raphaël Hertzog <[email protected]>
Date: Tue Nov 24 01:39:43 2009 +0100
Dpkg::Source::Package::V3::quilt: check debian/patches{,series} before build
Before accepting to build a 3.0 (quilt) source packages, ensure that
debian/patches is a directory (or non-existing) and that
debian/patches/series is a file (or non-existing).
diff --git a/debian/changelog b/debian/changelog
index cbad010..b1f0794 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ dpkg (1.14.28) UNRELEASED; urgency=low
- let dpkg-source fail if several upstream orig.tar files are
available (using different compression scheme) since we don't know
which one to use.
+ - before accepting to build a 3.0 (quilt) source packages, ensure that
+ debian/patches is a directory (or non-existing) and that
+ debian/patches/series is a file (or non-existing). Closes: #557618
-- Raphael Hertzog <[email protected]> Sun, 03 Jan 2010 18:21:35 +0100
diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm
b/scripts/Dpkg/Source/Package/V3/quilt.pm
index 2a02159..fbcf470 100644
--- a/scripts/Dpkg/Source/Package/V3/quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm
@@ -53,6 +53,24 @@ sub parse_cmdline_option {
return 0;
}
+sub can_build {
+ my ($self, $dir) = @_;
+ my ($code, $msg) = $self->SUPER::can_build($dir);
+ return ($code, $msg) if $code eq 0;
+ my $pd = File::Spec->catdir($dir, "debian", "patches");
+ if (-e $pd and not -d _) {
+ return (0, sprintf(_g("%s should be a directory or non-existing"),
$pd));
+ }
+ my $series_vendor = $self->get_series_file($dir);
+ my $series_main = File::Spec->catfile($pd, "series");
+ foreach my $series ($series_vendor, $series_main) {
+ if (defined($series) and -e $series and not -f _) {
+ return (0, sprintf(_g("%s should be a file or non-existing"),
$series));
+ }
+ }
+ return (1, "");
+}
+
sub get_autopatch_name {
my ($self) = @_;
return "debian-changes-" . $self->{'fields'}{'Version'};
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]