This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=57875d7ebb08c6d4ba74bed8363dc359ab7e0ee5 commit 57875d7ebb08c6d4ba74bed8363dc359ab7e0ee5 Author: Guillem Jover <[email protected]> AuthorDate: Tue Nov 8 05:59:37 2022 +0100 dpkg-buildpackage: Move error report into singfile() This simplifies the call sites, where we always want the same exact error handling behavior. Changelog: internal --- scripts/dpkg-buildpackage.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index 3a67e877c..0d5a58e0c 100755 --- a/scripts/dpkg-buildpackage.pl +++ b/scripts/dpkg-buildpackage.pl @@ -683,9 +683,7 @@ if ($signpause && ($signsource || $signbuildinfo || $signchanges)) { run_hook('sign', $signsource || $signbuildinfo || $signchanges); if ($signsource) { - if (signfile("$pv.dsc")) { - error(g_('failed to sign %s file'), '.dsc'); - } + signfile("$pv.dsc"); # Recompute the checksums as the .dsc has changed now. my $buildinfo = Dpkg::Control->new(type => CTRL_FILE_BUILDINFO); @@ -696,8 +694,8 @@ if ($signsource) { $checksums->export_to_control($buildinfo); $buildinfo->save($buildinfo_file); } -if ($signbuildinfo && signfile("$pva.buildinfo")) { - error(g_('failed to sign %s file'), '.buildinfo'); +if ($signbuildinfo) { + signfile("$pva.buildinfo"); } if ($signsource or $signbuildinfo) { # Recompute the checksums as the .dsc and/or .buildinfo have changed. @@ -713,8 +711,8 @@ if ($signsource or $signbuildinfo) { update_files_field($changes, $checksums, "$pva.buildinfo"); $changes->save($changes_file); } -if ($signchanges && signfile("$pva.changes")) { - error(g_('failed to sign %s file'), '.changes'); +if ($signchanges) { + signfile("$pva.changes"); } if (not $signreleased) { @@ -917,6 +915,8 @@ sub signfile { if ($status == 0) { move("$signfile.asc", "../$file") or syserror(g_('cannot move %s to %s'), "$signfile.asc", "../$file"); + } else { + error(g_('failed to sign %s file'), $file); } return $status -- Dpkg.Org's dpkg

