X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b7080ced608f012aee2566afc724c3727e75fc1b..97efc27f0723f09405d7a1836ab21c2e2948eb10:/doc/apt_preferences.5.xml diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 0d22d0413..f08f92b94 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -69,8 +69,8 @@ You have been warned. Note that the files in the /etc/apt/preferences.d directory are parsed in alphanumeric ascending order and need to obey the -following naming convention: The files have no or "pref" -as filename extension and which only contain alphanumeric, hyphen (-), +following naming convention: The files have either no or "pref" +as filename extension and only contain alphanumeric, hyphen (-), underscore (_) and period (.) characters. Otherwise APT will print a notice that it has ignored a file if the file doesn't match a pattern in the Dir::Ignore-Files-Silently @@ -105,12 +105,16 @@ algorithm to set the priorities of the versions of a package. Assign: priority 1 to the versions coming from archives which in their Release -files are marked as "NotAutomatic: yes" like the debian experimental archive. +files are marked as "NotAutomatic: yes" but not as "ButAutomaticUpgrades: yes" +like the debian experimental archive. priority 100 -to the version that is already installed (if any). +to the version that is already installed (if any) and to the versions coming +from archives which in their Release files are marked as "NotAutomatic: yes" and +"ButAutomaticUpgrades: yes" like the debian backports archive since squeeze-backports. + @@ -127,9 +131,10 @@ files are marked as "NotAutomatic: yes" like the debian experimental archive.If the target release has not been specified then APT simply assigns priority 100 to all installed package versions and priority 500 to all -uninstalled package versions, expect versions coming from archives which +uninstalled package versions, except versions coming from archives which in their Release files are marked as "NotAutomatic: yes" - -these versions get the priority 1. +these versions get the priority 1 or priority 100 if it is additionally marked +as "ButAutomaticUpgrades: yes". APT then applies the following rules, listed in order of precedence, to determine which version of a package to install. @@ -254,6 +259,49 @@ Pin-Priority: 500 +Regular expressions and glob() syntax + +APT also supports pinning by glob() expressions and regular +expressions surrounded by /. For example, the following +example assigns the priority 500 to all packages from +experimental where the name starts with gnome (as a glob()-like +expression) or contains the word kde (as a POSIX extended regular +expression surrounded by slashes). + + + +Package: gnome* /kde/ +Pin: release n=experimental +Pin-Priority: 500 + + + +The rule for those expressions is that they can occur anywhere +where a string can occur. Thus, the following pin assigns the +priority 990 to all packages from a release starting with karmic. + + + +Package: * +Pin: release n=karmic* +Pin-Priority: 990 + + +If a regular expression occurs in a Package field, +the behavior is the same as if this regular expression were replaced +with a list of all package names it matches. It is undecided whether +this will change in the future, thus you should always list wild-card +pins first, so later specific pins override it. + +The pattern "*" in a Package field is not considered +a glob() expression in itself. + + + + + + + How APT Interprets Priorities