X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/44477002adb73db2324f4218e5d85aae016ff5fa..0b23d3c0a7a116a19c14ae63b6281464ba1382a4:/doc/apt_preferences.5.xml?ds=sidebyside diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 9d3fc1854..cac9a96e1 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -1,16 +1,9 @@ -%aptent; - - -%aptverbatiment; - - - - + %aptent; + %aptverbatiment; + %aptvendor; ]> @@ -20,7 +13,7 @@ &apt-email; &apt-product; - 2010-02-16T00:00:00Z + 2015-08-15T00:00:00Z @@ -77,7 +70,7 @@ as filename extension and only contain alphanumeric, hyphen (-), underscore (_) and period (.) characters. Otherwise APT will print a notice that it has ignored a file, unless that file matches a pattern in the Dir::Ignore-Files-Silently -configuration list - in this case it will be silently ignored. +configuration list - in which case it will be silently ignored. APT's Default Priority Assignments @@ -122,14 +115,17 @@ from archives which in their Release files are marked as "N priority 500 -to the versions that are not installed and do not belong to the target release. +to the versions that do not belong to the target release. priority 990 -to the versions that are not installed and belong to the target release. +to the versions that belong to the target release. + +The highest of those priorities whose description matches the version is assigned to the +version. If the target release has not been specified then APT simply assigns @@ -239,25 +235,30 @@ Pin-Priority: 50 The following record assigns a high priority to all package versions -belonging to any distribution whose Codename is "&testing-codename;". +belonging to any distribution whose Codename is "&debian-testing-codename;". Package: * -Pin: release n=&testing-codename; +Pin: release n=&debian-testing-codename; Pin-Priority: 900 The following record assigns a high priority to all package versions belonging to any release whose Archive name is "stable" -and whose release Version number is "&stable-version;". +and whose release Version number is "&debian-stable-version;". Package: * -Pin: release a=stable, v=&stable-version; +Pin: release a=stable, v=&debian-stable-version; Pin-Priority: 500 + +The effect of the comma operator is similar to an "and" in logic: All +conditions must be satisfied for the pin to match. There is one exception: +For any type of condition (such as two "a" conditions), only the last such +condition is checked. @@ -274,7 +275,7 @@ expression surrounded by slashes). Package: gnome* /kde/ -Pin: release n=experimental +Pin: release a=experimental Pin-Priority: 500 @@ -315,30 +316,30 @@ or negative integers. They are interpreted as follows (roughly speaking): -P > 1000 +P >= 1000 causes a version to be installed even if this constitutes a downgrade of the package -990 < P <=1000 +990 <= P < 1000 causes a version to be installed even if it does not come from the target release, unless the installed version is more recent -500 < P <=990 +500 <= P < 990 causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent -100 < P <=500 +100 <= P < 500 causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent -0 < P <=100 +0 < P < 100 causes a version to be installed only if there is no installed version of the package @@ -346,14 +347,21 @@ only if there is no installed version of the package P < 0 prevents the version from being installed + +P = 0 +has undefined behaviour, do not use it. + -If any specific-form records match an available package version then the -first such record determines the priority of the package version. -Failing that, -if any general-form records match an available package version then the -first such record determines the priority of the package version. + +The first specific-form record matching an available package version determines +the priority of the package version. +Failing that, the priority of the package is defined as the maximum of all +priorities defined by generic-form records matching the version. +Records defined using patterns in the Pin field other than "*" are treated like +specific-form records. + For example, suppose the APT preferences file contains the three records presented earlier: @@ -420,7 +428,7 @@ APT priorities: The Release file is normally found in the directory .../dists/dist-name: for example, .../dists/stable/Release, -or .../dists/&stable-codename;/Release. +or .../dists/&debian-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 @@ -448,14 +456,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: &testing-codename;" +"Codename: &debian-testing-codename;" specifies that all of the packages in the directory tree below the parent of the Release file belong to a version named -&testing-codename;. Specifying this value in the APT preferences file +&debian-testing-codename;. Specifying this value in the APT preferences file would require the line: -Pin: release n=&testing-codename; +Pin: release n=&debian-testing-codename; @@ -464,16 +472,16 @@ Pin: release n=&testing-codename; the Version: line names the release version. For example, the packages in the tree might belong to Debian release -version &stable-version;. Note that there is normally no version number for the +version &debian-stable-version;. Note that there is normally no version number for the testing and unstable distributions because they have not been released yet. Specifying this in the APT preferences file would require one of the following lines. -Pin: release v=&stable-version; -Pin: release a=stable, v=&stable-version; -Pin: release &stable-version; +Pin: release v=&debian-stable-version; +Pin: release a=stable, v=&debian-stable-version; +Pin: release &debian-stable-version; @@ -655,9 +663,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 &testing-codename; or sid +Explanation: other than those in the distribution codenamed with &debian-testing-codename; or sid Package: * -Pin: release n=&testing-codename; +Pin: release n=&debian-testing-codename; Pin-Priority: 900 Explanation: Debian unstable is always codenamed with sid @@ -673,7 +681,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 &testing-codename;. +latest version(s) in the release codenamed with &debian-testing-codename;. apt-get install package-name @@ -685,7 +693,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 &testing-codename; version if that is +the package to the most recent &debian-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.