From 7f64bc6544061ba534541a66ae4dab8c88a96a14 Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Sun, 22 Nov 2009 16:34:11 +0100 Subject: dpkg-source: fail if several orig.tar files are available This concerns formats 2.0 and 3.0 (quilt) where the upstream tarball can be available with different compression schemes. We need precisely one file otherwise it doesn't know which one should be used and might pick the wrong one. --- scripts/Dpkg/Source/Package/V2.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/Dpkg/Source/Package/V2.pm') diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index e1874cb2d..6757795c3 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -248,6 +248,10 @@ sub do_build { my @origtarballs; foreach (sort $self->find_original_tarballs()) { if (/\.orig\.tar\.$comp_regex$/) { + if (defined($tarfile)) { + error(_g("several orig.tar files found (%s and %s) but only " . + "one is allowed"), $tarfile, $_); + } $tarfile = $_; push @origtarballs, $_; $self->add_file($_); -- cgit v1.2.3