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=b568951795641269182a60d6bd385e62e3e2ca35

commit b568951795641269182a60d6bd385e62e3e2ca35
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Nov 2 02:25:03 2022 +0100

    Dpkg::OpenPGP: Pass an array instead of an arrayref to _gpg_exec()
    
    We do not need to pass any options, so passing an array makes the call
    sites more ergonomic.
---
 scripts/Dpkg/OpenPGP.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/Dpkg/OpenPGP.pm b/scripts/Dpkg/OpenPGP.pm
index 9db4bffea..9695b2a09 100644
--- a/scripts/Dpkg/OpenPGP.pm
+++ b/scripts/Dpkg/OpenPGP.pm
@@ -162,17 +162,17 @@ sub dearmor {
 
 sub _gpg_exec
 {
-    my ($self, $exec) = @_;
+    my ($self, @exec) = @_;
 
     my ($stdout, $stderr);
-    spawn(exec => $exec, wait_child => 1, nocheck => 1, timeout => 10,
+    spawn(exec => \@exec, wait_child => 1, nocheck => 1, timeout => 10,
           to_string => \$stdout, error_to_string => \$stderr);
     if (WIFEXITED($?)) {
         my $status = WEXITSTATUS($?);
         print { *STDERR } "$stdout$stderr" if $status;
         return $status;
     } else {
-        subprocerr("@{$exec}");
+        subprocerr("@exec");
     }
 }
 
@@ -205,7 +205,7 @@ sub _gpg_verify {
     push @exec, $sig if defined $sig;
     push @exec, $data;
 
-    my $status = $self->_gpg_exec(\@exec);
+    my $status = $self->_gpg_exec(@exec);
     if ($status == 1 or ($status && $self->{require_valid_signature})) {
         error(g_('cannot verify signature for %s'), $data);
     } elsif ($status) {

-- 
Dpkg.Org's dpkg

Reply via email to