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=33ca537f56286fb6f705a1a3056c033591aed91d

commit 33ca537f56286fb6f705a1a3056c033591aed91d
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Wed Dec 22 00:53:12 2021 +0100

    Dpkg::Control::FieldsCore: Add missing allowed fields for (In)Release files
    
    Allow Version, Acquire-By-Hash, NotAutomatic, ButAutomaticUpgrades and
    No-Support-for-Architecture-all fields.
---
 scripts/Dpkg/Control/FieldsCore.pm | 23 ++++++++++++++++++++++-
 scripts/t/Dpkg_Control_Fields.t    |  7 ++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/scripts/Dpkg/Control/FieldsCore.pm 
b/scripts/Dpkg/Control/FieldsCore.pm
index c93325882..b04c0caec 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -65,6 +65,10 @@ use constant {
 # Note that fields used only in dpkg's available file are not listed
 # Deprecated fields of dpkg's status file are also not listed
 our %FIELDS = (
+    'acquire-by-hash' => {
+        name => 'Acquire-By-Hash',
+        allowed => CTRL_REPO_RELEASE,
+    },
     'architecture' => {
         name => 'Architecture',
         allowed => (ALL_PKG | ALL_SRC | CTRL_FILE_BUILDINFO | 
CTRL_FILE_CHANGES | CTRL_TESTS) & (~CTRL_INFO_SRC),
@@ -194,6 +198,10 @@ our %FIELDS = (
         dependency => 'union',
         dep_order => 10,
     },
+    'butautomaticupgrades' => {
+        name => 'ButAutomaticUpgrades',
+        allowed => CTRL_REPO_RELEASE,
+    },
     'changed-by' => {
         name => 'Changed-By',
         allowed => CTRL_FILE_CHANGES,
@@ -372,6 +380,14 @@ our %FIELDS = (
         name => 'Multi-Arch',
         allowed => ALL_PKG,
     },
+    'no-support-for-architecture-all' => {
+        name => 'No-Support-for-Architecture-all',
+        allowed => CTRL_REPO_RELEASE,
+    },
+    'notautomatic' => {
+        name => 'NotAutomatic',
+        allowed => CTRL_REPO_RELEASE,
+    },
     'package' => {
         name => 'Package',
         allowed => ALL_PKG | CTRL_INDEX_SRC,
@@ -598,7 +614,7 @@ our %FIELDS = (
     },
     'version' => {
         name => 'Version',
-        allowed => (ALL_PKG | ALL_SRC | CTRL_FILE_BUILDINFO | ALL_CHANGES) &
+        allowed => (ALL_PKG | ALL_SRC | CTRL_FILE_BUILDINFO | ALL_CHANGES | 
CTRL_REPO_RELEASE) &
                     (~(CTRL_INFO_SRC | CTRL_INFO_PKG)),
     },
 );
@@ -780,10 +796,15 @@ our %FIELD_ORDER = (
             origin
             label
             suite
+            version
             codename
             changelogs
             date
             valid-until
+            notautomatic
+            butautomaticupgrades
+            acquire-by-hash
+            no-support-for-architecture-all
             architectures
             components
             description
diff --git a/scripts/t/Dpkg_Control_Fields.t b/scripts/t/Dpkg_Control_Fields.t
index a1e0e017d..e8da00b95 100644
--- a/scripts/t/Dpkg_Control_Fields.t
+++ b/scripts/t/Dpkg_Control_Fields.t
@@ -20,7 +20,7 @@ use Test::More;
 use Test::Dpkg qw(:paths);
 
 BEGIN {
-    plan tests => 2467;
+    plan tests => 2555;
 
     use_ok('Dpkg::Control::Types');
     use_ok('Dpkg::Control::FieldsCore');
@@ -274,10 +274,15 @@ my %fields = (
                 Origin
                 Label
                 Suite
+                Version
                 Codename
                 Changelogs
                 Date
                 Valid-Until
+                NotAutomatic
+                ButAutomaticUpgrades
+                Acquire-By-Hash
+                No-Support-for-Architecture-all
                 Architectures
                 Components
                 Description

-- 
Dpkg.Org's dpkg

Reply via email to