diff options
| author | Simon McVittie <smcv@debian.org> | 2024-12-24 13:53:48 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-05-19 16:05:40 +0000 |
| commit | 49681c12b124e236731524b6fbbab7f91147295b (patch) | |
| tree | 6ff60752e6995e321df06040c69cb867a6d3d036 /doc | |
| parent | 50adb7b651317c22e7997991e07a6b78568337e1 (diff) | |
apt_preferences(5): Specify the order in which files are parsed
The order of preference stanzas matters, but this man page did not
previously define whether /etc/apt/preferences was parsed before or
after the fragment files in preferences.d. Giving a concrete example
also provides a hint that numeric prefixes are a useful way to force a
particular sort order, and clarifies that the presence or absence of
the .pref extension is less important than lexicographic order.
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/apt_preferences.5.xml | 15 |
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 |
