[Reproducible-commits] [dpkg] 05/09: Dpkg::Source::Package::V3::quilt: check debian/patches{, series} before build
Holger Levsen
holger at layer-acht.org
Tue May 3 08:43:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to annotated tag 1.14.28
in repository dpkg.
commit dd860985ee919f02e820e7b26f5f21420edc0bd1
Author: Raphaël Hertzog <hertzog at debian.org>
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).
---
debian/changelog | 3 +++
scripts/Dpkg/Source/Package/V3/quilt.pm | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
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 <hertzog at debian.org> 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'};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list