Hi Guillem and Sean, On 2025-10-02 23:53, Sean Whitton wrote: > On Thu 02 Oct 2025 at 04:38pm +02, Guillem Jover wrote: > >> Hi! >> >> On Wed, 2025-09-17 at 23:06:29 +0530, Nilesh Patra wrote: >>> diff --git a/policy/ch-archive.rst b/policy/ch-archive.rst >>> index 302dc8d..3bf5abf 100644 >>> --- a/policy/ch-archive.rst >>> +++ b/policy/ch-archive.rst >>> @@ -376,11 +376,14 @@ Priorities >>> ---------- >>> >>> Each package must have a *priority* value, which is set in the metadata >>> -for the Debian archive and is also included in the package's control >>> -files (see :ref:`s-f-Priority`). This information is used >>> +for the Debian archive and is also included in the package's binary >>> +control files (see :ref:`s-f-Priority`). This information is used >>> to control which packages are included in standard or minimal Debian >>> installations. >>> >>> +If the *Priority* field is not specified in the source control file, dpkg >>> +sets it to ``optional`` by default starting version 1.22.13. >> >> After the control file nomenclature unification, "source control file" >> should always refer to a «.dsc», in this case I think you mean >> "source package template control file". >> >> Also, not sure whether to make it explicit as in "not specified in any >> of the stanzas" but perhaps that's unnecessary.
Guillem, if a source package has no Priority field in the source stanza and has binary packages `foo` and `bar`; let's say `foo` has "Priority: Required" in its binary stanza, and `bar` omits this field altogether. In such case, dpkg will default to "Priority: Optional" for `bar` and "Priority: Required" shall be chosen for `foo` right? In that case the wording "not specified in any of the stanzas" for dpkg to default to "Priority: Optional" may sound a little bit confusing. It may lead to someone thinking for the above case that `bar` may _not_ be chosen with "Priority: Optional" (as `foo` specifies this field)? I've tried to reword this in a less confusing way. Please take a look below, and just tell me to fix it further if it still isn't looking good and I'll revise it. > Thank you for these comments, Guillem. > > Nilesh, would you be able to revise your patch? Sure! Revised patch pasted below: diff --git a/policy/ch-archive.rst b/policy/ch-archive.rst index 302dc8d..764ef76 100644 --- a/policy/ch-archive.rst +++ b/policy/ch-archive.rst @@ -376,11 +376,16 @@ Priorities ---------- Each package must have a *priority* value, which is set in the metadata -for the Debian archive and is also included in the package's control -files (see :ref:`s-f-Priority`). This information is used +for the Debian archive and is also included in the package's binary +control files (see :ref:`s-f-Priority`). This information is used to control which packages are included in standard or minimal Debian installations. +Starting with dpkg version 1.22.13, the *Priority* of a binary package is +set to ``optional`` unless specified otherwise in the source or binary stanzas +in the source package template control file. +Therefore, explicitly specifying *Priority* as ``optional`` may be omitted. + Most Debian packages will have a priority of ``optional``. Priority levels other than ``optional`` are only used for packages that should be included by default in a standard installation of Debian. diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst index 9f06cc9..e4390b4 100644 --- a/policy/ch-controlfields.rst +++ b/policy/ch-controlfields.rst @@ -116,7 +116,7 @@ The fields in the source package stanza (the first one) are: - :ref:`Section <s-f-Section>` (recommended) -- :ref:`Priority <s-f-Priority>` (recommended) +- :ref:`Priority <s-f-Priority>` - :ref:`Build-Depends et al <s-sourcebinarydeps>` @@ -138,7 +138,7 @@ The fields in the binary package stanzas are: - :ref:`Section <s-f-Section>` (recommended) -- :ref:`Priority <s-f-Priority>` (recommended) +- :ref:`Priority <s-f-Priority>` - :ref:`Essential <s-f-Essential>`

