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=6839c8346115dcf1f5fe1a7fd26a360512725972

commit 6839c8346115dcf1f5fe1a7fd26a360512725972
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Feb 8 14:10:03 2025 +0100

    Dpkg::OpenPGP::Backend: Support disabling cmd and cmdv via 'none' value
    
    For testing purposes, to be able to exercise different code paths,
    it is desirable to be able to disable either cmd or cmdv with a value
    that we can be certain will never match on the filesystem. Instead of
    hoping that «none» will not exist on disk, handle it explicitly in the
    detection code.
---
 scripts/Dpkg/OpenPGP/Backend.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Dpkg/OpenPGP/Backend.pm b/scripts/Dpkg/OpenPGP/Backend.pm
index 0216941e7..46b75fc0d 100644
--- a/scripts/Dpkg/OpenPGP/Backend.pm
+++ b/scripts/Dpkg/OpenPGP/Backend.pm
@@ -59,6 +59,8 @@ sub _detect_cmd {
 
     if (! defined $cmd || $cmd eq 'auto') {
         return first { find_command($_) } @{$default};
+    } elsif ($cmd eq 'none') {
+        return;
     } else {
         return find_command($cmd);
     }

-- 
Dpkg.Org's dpkg

Reply via email to