This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=522e3b46ee9861f6e1b87124066d716a5b6a6c0c commit 522e3b46ee9861f6e1b87124066d716a5b6a6c0c Author: Guillem Jover <[email protected]> AuthorDate: Wed May 1 23:18:34 2019 +0200 Dpkg::Source::Package: Refactor original tarball handling --- debian/changelog | 2 ++ scripts/Dpkg/Source/Package/V1.pm | 8 +++++--- scripts/Dpkg/Source/Package/V2.pm | 32 ++++++++++++++------------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/debian/changelog b/debian/changelog index bb386ab0b..bcec8748f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium * perl: Remove support for versioned GnuPG 2 program and packages. * Documentation: - man: Fix uncommon wording constructs. + * Code internals: + - Dpkg::Source::Package: Refactor original tarball handling. * Build system: - Bump minimal Perl version to 5.24.1. diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index be13750a4..ff683af21 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -409,9 +409,11 @@ sub do_build { $sourcepackage, $tarname); } - $self->add_file($tarname) if $tarname; - if ($tarname and -e "$tarname.sig" and not -e "$tarname.asc") { - openpgp_sig_to_asc("$tarname.sig", "$tarname.asc"); + if ($tarname) { + $self->add_file($tarname); + if (-e "$tarname.sig" and not -e "$tarname.asc") { + openpgp_sig_to_asc("$tarname.sig", "$tarname.asc"); + } } if ($tarsign and -e $tarsign) { info(g_('building %s using existing %s'), $sourcepackage, $tarsign); diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index e2c1b49fb..db9bd3e71 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -408,26 +408,22 @@ sub _generate_patch { 'one is allowed'), $tarfile, $file); } $tarfile = $file; - push @origtarfiles, $file; - $self->add_file($file); - if (-e "$file.sig" and not -e "$file.asc") { - openpgp_sig_to_asc("$file.sig", "$file.asc"); - } - if (-e "$file.asc") { - push @origtarfiles, "$file.asc"; - $self->add_file("$file.asc") - } } elsif ($file =~ /\.orig-([[:alnum:]-]+)\.tar\.$comp_ext_regex$/) { $addonfile{$1} = $file; - push @origtarfiles, $file; - $self->add_file($file); - if (-e "$file.sig" and not -e "$file.asc") { - openpgp_sig_to_asc("$file.sig", "$file.asc"); - } - if (-e "$file.asc") { - push @origtarfiles, "$file.asc"; - $self->add_file("$file.asc"); - } + } else { + next; + } + + push @origtarfiles, $file; + $self->add_file($file); + + # Check for an upstream signature. + if (-e "$file.sig" and not -e "$file.asc") { + openpgp_sig_to_asc("$file.sig", "$file.asc"); + } + if (-e "$file.asc") { + push @origtarfiles, "$file.asc"; + $self->add_file("$file.asc") } } -- Dpkg.Org's dpkg

