summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-05-19 16:06:58 +0000
committerJulian Andres Klode <jak@debian.org>2025-05-19 16:06:58 +0000
commitc3c49939b75a05e0e4a8cc52ec807b4756ea2d5c (patch)
tree6ff60752e6995e321df06040c69cb867a6d3d036
parent50adb7b651317c22e7997991e07a6b78568337e1 (diff)
parent49681c12b124e236731524b6fbbab7f91147295b (diff)
Merge branch 'prefs-precedence' into 'main'
apt_preferences(5): Specify the order in which files are parsed See merge request apt-team/apt!416
-rw-r--r--doc/apt_preferences.5.xml15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml
index d1047e1e9..6e4e321cd 100644
--- a/doc/apt_preferences.5.xml
+++ b/doc/apt_preferences.5.xml
@@ -64,7 +64,7 @@ together with other packages from different releases.
You have been warned.</para>
<para>Note that the files in the <filename>/etc/apt/preferences.d</filename>
-directory are parsed in alphanumeric ascending order and need to obey the
+directory need to obey the
following naming convention: The files have either no or "<literal>pref</literal>"
as filename extension and only contain alphanumeric, hyphen (-),
underscore (_) and period (.) characters.
@@ -72,6 +72,19 @@ Otherwise APT will print a notice that it has ignored a file, unless that
file matches a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
configuration list - in which case it will be silently ignored.</para>
+<para><filename>/etc/apt/preferences</filename>
+is parsed first,
+followed by the files in
+<filename>/etc/apt/preferences.d</filename>
+in lexicographic order.
+For example,
+<filename>/etc/apt/preferences.d/00-high-priority.pref</filename>,
+<filename>/etc/apt/preferences.d/50-mid-priority</filename>
+and
+<filename>/etc/apt/preferences.d/z-low-priority.pref</filename>
+would be parsed in that order.
+</para>
+
<refsect2><title>APT's Default Priority Assignments</title>
<para>If there is no preferences file or if there is no entry in the file