From 28670fc27f2f268dd47c89a76559f3778c1d9daf Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Sat, 3 Jan 2026 11:44:09 +0100
Subject: [PATCH] Let missing Priority field mean optional

Debian Policy 4.7.3 was updated to allow Priority fields to be optional

https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities

Some improved wording are discussed but effect remains the same

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1124443
---
 dl10n-check | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dl10n-check b/dl10n-check
index 1bc4174..b0cbe0f 100755
--- a/dl10n-check
+++ b/dl10n-check
@@ -472,6 +472,8 @@ sub parse_tarball {
         }
         if (exists $source->{Priority}) {
             $priority = $source->{Priority};
+        } else {
+            $priority = "optional";
         }
         if ($section eq "") {
                 $data->add_errors($pkg,"source does not specify a section\n");
@@ -487,10 +489,7 @@ sub parse_tarball {
                         $section  = "?";
                 }
         }
-        if ($priority eq "") {
-                $data->add_errors($pkg,"source does not specify a priority\n");
-                $priority  = "?";
-        } elsif (!exists($priorities{$priority})) {
+        if (!exists($priorities{$priority})) {
                 $data->add_errors($pkg,"'$priority' is not a valid priority\n");
                 $priority = "?";
         }
-- 
GitLab

