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=717e82ec2fe4f714dc6f6b70548bbcc8dbbae183

commit 717e82ec2fe4f714dc6f6b70548bbcc8dbbae183
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Oct 14 22:53:28 2022 +0200

    dpkg-name: Use none() instead of ad-hoc comparisons
    
    Changelog: internal
---
 scripts/dpkg-name.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/dpkg-name.pl b/scripts/dpkg-name.pl
index 5322df867..0fc4b324f 100755
--- a/scripts/dpkg-name.pl
+++ b/scripts/dpkg-name.pl
@@ -21,6 +21,7 @@
 use warnings;
 use strict;
 
+use List::Util qw(none);
 use File::Basename;
 use File::Path qw(make_path);
 
@@ -151,8 +152,7 @@ sub getdir($$$)
                 warning(g_("assuming section '%s' for '%s'"), $section,
                         $filename);
             }
-            if ($section ne 'non-free' and $section ne 'contrib' and
-                $section ne 'no-section') {
+            if (none { $section eq $_ } qw(no-section contrib non-free)) {
                 $dir = "unstable/binary-$arch/$section";
             } else {
                 $dir = "$section/binary-$arch";

-- 
Dpkg.Org's dpkg

Reply via email to