X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/549edd163e34a50091623b47881f2eefbdc53aca..187aa32e8c6bafcbeb8aaacf5f6d9f20dcb14854:/doc/apt_preferences.5.xml diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 77b7776e8..a6f68dfe7 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -1,10 +1,13 @@ - %aptent; + +%aptverbatiment; + ]> @@ -14,7 +17,7 @@ &apt-email; &apt-product; - 16 February 2010 + 2010-02-16T00:00:00Z @@ -66,10 +69,12 @@ 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 (-), -underscore (_) and period (.) characters - otherwise they will be silently -ignored. +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 +configuration list - in this case it will be silently ignored. APT's Default Priority Assignments @@ -97,9 +102,19 @@ APT::Default-Release "stable"; 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" 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. + @@ -116,7 +131,10 @@ algorithm to set the priorities of the versions of a package. Assign: 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. +uninstalled package versions, except versions coming from archives which +in their Release files are marked as "NotAutomatic: yes" - +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. @@ -218,11 +236,11 @@ Pin-Priority: 50 The following record assigns a high priority to all package versions -belonging to any distribution whose Codename is "squeeze". +belonging to any distribution whose Codename is "&testing-codename;". Package: * -Pin: release n=squeeze +Pin: release n=&testing-codename; Pin-Priority: 900 @@ -241,6 +259,50 @@ 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 @@ -355,7 +417,7 @@ APT priorities: The Release file is normally found in the directory .../dists/dist-name: for example, .../dists/stable/Release, -or .../dists/woody/Release. +or .../dists/&stable-codename;/Release. It consists of a single multi-line record which applies to all of the packages in the directory tree below its parent. Unlike the Packages file, nearly all of the lines in a Release @@ -383,14 +445,14 @@ Pin: release a=stable the Codename: line names the codename to which all the packages in the directory tree belong. For example, the line -"Codename: squeeze" +"Codename: &testing-codename;" specifies that all of the packages in the directory tree below the parent of the Release file belong to a version named -squeeze. Specifying this value in the APT preferences file +&testing-codename;. Specifying this value in the APT preferences file would require the line: -Pin: release n=squeeze +Pin: release n=&testing-codename; @@ -590,9 +652,9 @@ the example configurations above. Explanation: Uninstall or do not install any Debian-originated package versions -Explanation: other than those in the distribution codenamed with squeeze or sid +Explanation: other than those in the distribution codenamed with &testing-codename; or sid Package: * -Pin: release n=squeeze +Pin: release n=&testing-codename; Pin-Priority: 900 Explanation: Debian unstable is always codenamed with sid @@ -608,7 +670,7 @@ Pin-Priority: -10 With a suitable &sources-list; file and the above preferences file, any of the following commands will cause APT to upgrade to the -latest version(s) in the release codenamed with squeeze. +latest version(s) in the release codenamed with &testing-codename;. apt-get install package-name @@ -620,7 +682,7 @@ apt-get dist-upgrade The following command will cause APT to upgrade the specified package to the latest version from the sid distribution. Thereafter, apt-get upgrade will upgrade -the package to the most recent squeeze version if that is +the package to the most recent &testing-codename; version if that is more recent than the installed version, otherwise, to the most recent sid version if that is more recent than the installed version.