~racb/ubuntu/quantal/apt/by_hash

« back to all changes in this revision

Viewing changes to doc/apt_preferences.5.xml

  • Committer: Package Import Robot
  • Author(s): Steve Langasek, Michael Vogt, Steve Langasek
  • Date: 2012-06-11 22:36:16 UTC
  • mfrom: (1.4.47 sid)
  • Revision ID: package-import@ubuntu.com-20120611223616-1cctfc7qrxrx4vcu
Tags: 0.9.6ubuntu1
[ Michael Vogt ]
* merged from Debian, remaining changes:
  - use ubuntu keyring and ubuntu archive keyring in apt-key
  - run update-apt-xapian-index in apt.cron
  - support apt-key net-update and verify keys against master-keyring
  - run apt-key net-update in cron.daily
  - different example sources.list
  - APT::pkgPackageManager::MaxLoopCount set to 5000
  - apport pkgfailure handling
  - ubuntu changelog download handling
  - patch for apt cross-building, see http://bugs.debian.org/666772

[ Steve Langasek ]
* Drop upgrade handling for obsolete conffile /etc/apt/apt.conf.d/01ubuntu,
  removed in previous LTS.
* prepare-release: declare the packages needed as source build deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2
 
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3
 
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 
3
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
4
 
5
5
<!ENTITY % aptent SYSTEM "apt.ent">
6
6
%aptent;
17
17
   &apt-email;
18
18
   &apt-product;
19
19
   <!-- The last update date -->
20
 
   <date>16 February 2010</date>
 
20
   <date>2012-06-09T00:00:00Z</date>
21
21
 </refentryinfo>
22
22
 
23
23
 <refmeta>
45
45
APT assigns a priority to each version that is available.
46
46
Subject to dependency constraints, <command>apt-get</command> selects the
47
47
version with the highest priority for installation.
48
 
The APT preferences file overrides the priorities that APT assigns to
 
48
The APT preferences override the priorities that APT assigns to
49
49
package versions by default, thus giving the user control over which
50
50
one is selected for installation.</para>
51
51
 
53
53
the &sources-list; file contains references to more than one source.
54
54
In this case <command>apt-get</command> downloads the instance listed
55
55
earliest in the &sources-list; file.
56
 
The APT preferences file does not affect the choice of instance, only
 
56
The APT preferences do not affect the choice of instance, only
57
57
the choice of version.</para>
58
58
 
59
59
<para>Preferences are a strong power in the hands of a system administrator
60
60
but they can become also their biggest nightmare if used without care!
61
 
APT will not questioning the preferences so wrong settings will therefore
 
61
APT will not question the preferences, so wrong settings can
62
62
lead to uninstallable packages or wrong decisions while upgrading packages.
63
 
Even more problems will arise if multiply distribution releases are mixed
 
63
Even more problems will arise if multiple distribution releases are mixed
64
64
without a good understanding of the following paragraphs.
65
 
Packages included in a specific release aren't tested in and
66
 
therefore doesn't always work as expected in older or newer releases or
 
65
Packages included in a specific release aren't tested in (and
 
66
therefore don't always work as expected in) older or newer releases, or
67
67
together with other packages from different releases.
68
68
You have been warned.</para>
69
69
 
72
72
following naming convention: The files have either no or "<literal>pref</literal>"
73
73
as filename extension and only contain alphanumeric, hyphen (-),
74
74
underscore (_) and period (.) characters.
75
 
Otherwise APT will print a notice that it has ignored a file if the file
76
 
doesn't match a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
77
 
configuration list - in this case it will be silently ignored.</para>
 
75
Otherwise APT will print a notice that it has ignored a file, unless that
 
76
file matches a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
 
77
configuration list - in which case it will be silently ignored.</para>
78
78
 
79
79
<refsect2><title>APT's Default Priority Assignments</title>
80
80
 
106
106
<term>priority 1</term>
107
107
<listitem><simpara>to the versions coming from archives which in their <filename>Release</filename>
108
108
files are marked as "NotAutomatic: yes" but <emphasis>not</emphasis> as "ButAutomaticUpgrades: yes"
109
 
like the debian <literal>experimental</literal> archive.</simpara></listitem>
 
109
like the Debian <literal>experimental</literal> archive.</simpara></listitem>
110
110
</varlistentry>
111
111
 
112
112
<varlistentry>
113
113
<term>priority 100</term>
114
114
<listitem><simpara>to the version that is already installed (if any) and to the versions coming
115
115
from archives which in their <filename>Release</filename> files are marked as "NotAutomatic: yes" and
116
 
"ButAutomaticUpgrades: yes" like the debian backports archive since <literal>squeeze-backports</literal>.
 
116
"ButAutomaticUpgrades: yes" like the Debian backports archive since <literal>squeeze-backports</literal>.
117
117
</simpara></listitem>
118
118
</varlistentry>
119
119
 
185
185
<itemizedlist>
186
186
<listitem>
187
187
<simpara>The specific form assigns a priority (a "Pin-Priority") to one or more
188
 
specified packages and specified version or version range.  For example,
 
188
specified packages with a specified version or version range.  For example,
189
189
the following record assigns a high priority to all versions of
190
 
the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".
 
190
the <filename>perl</filename> package whose version number begins with "<literal>&good-perl;</literal>".
191
191
Multiple packages can be separated by spaces.</simpara>
192
192
 
193
193
<programlisting>
194
194
Package: perl
195
 
Pin: version 5.8*
 
195
Pin: version &good-perl;*
196
196
Pin-Priority: 1001
197
197
</programlisting>
198
198
</listitem>
246
246
 
247
247
<simpara>The following record assigns a high priority to all package versions
248
248
belonging to any release whose Archive name is "<literal>stable</literal>"
249
 
and whose release Version number is "<literal>3.0</literal>".</simpara>
 
249
and whose release Version number is "<literal>&stable-version;</literal>".</simpara>
250
250
 
251
251
<programlisting>
252
252
Package: *
253
 
Pin: release a=stable, v=3.0
 
253
Pin: release a=stable, v=&stable-version;
254
254
Pin-Priority: 500
255
255
</programlisting>
256
256
</listitem>
259
259
 
260
260
</refsect2>
261
261
 
262
 
<refsect2><title>Regular expressions and glob() syntax</title>
 
262
<refsect2><title>Regular expressions and &glob; syntax</title>
263
263
<para>
264
 
APT also supports pinning by glob() expressions and regular
265
 
expressions surrounded by /. For example, the following
 
264
APT also supports pinning by &glob; expressions, and regular
 
265
expressions surrounded by slashes. For example, the following
266
266
example assigns the priority 500 to all packages from
267
 
experimental where the name starts with gnome (as a glob()-like
 
267
experimental where the name starts with gnome (as a &glob;-like
268
268
expression) or contains the word kde (as a POSIX extended regular
269
269
expression surrounded by slashes).
270
270
</para>
278
278
<para>
279
279
The rule for those expressions is that they can occur anywhere
280
280
where a string can occur. Thus, the following pin assigns the
281
 
priority 990 to all packages from a release starting with karmic.
 
281
priority 990 to all packages from a release starting with &ubuntu-codename;.
282
282
</para>
283
283
 
284
284
<programlisting>
285
285
Package: *
286
 
Pin: release n=karmic*
 
286
Pin: release n=&ubuntu-codename;*
287
287
Pin-Priority: 990
288
288
</programlisting>
289
289
 
 
290
<para>
290
291
If a regular expression occurs in a <literal>Package</literal> field,
291
292
the behavior is the same as if this regular expression were replaced
292
293
with a list of all package names it matches. It is undecided whether
293
 
this will change in the future, thus you should always list wild-card
 
294
this will change in the future; thus you should always list wild-card
294
295
pins first, so later specific pins override it.
295
296
 
296
297
The pattern "<literal>*</literal>" in a Package field is not considered
297
 
a glob() expression in itself.
298
 
 
 
298
a &glob; expression in itself.
 
299
</para>
299
300
</refsect2>
300
301
 
301
302
 
356
357
 
357
358
<programlisting>
358
359
Package: perl
359
 
Pin: version 5.8*
 
360
Pin: version &good-perl;*
360
361
Pin-Priority: 1001
361
362
 
362
363
Package: *
372
373
<itemizedlist>
373
374
<listitem><simpara>The most recent available version of the <literal>perl</literal>
374
375
package will be installed, so long as that version's version number begins
375
 
with "<literal>5.8</literal>".  If <emphasis>any</emphasis> 5.8* version of <literal>perl</literal> is
376
 
available and the installed version is 5.9*, then <literal>perl</literal> will be
 
376
with "<literal>&good-perl;</literal>".  If <emphasis>any</emphasis> &good-perl;* version of <literal>perl</literal> is
 
377
available and the installed version is &bad-perl;*, then <literal>perl</literal> will be
377
378
downgraded.</simpara></listitem>
378
379
<listitem><simpara>A version of any package other than <literal>perl</literal>
379
380
that is available from the local system has priority over other versions,
459
460
<varlistentry>
460
461
<term>the <literal>Version:</literal> line</term>
461
462
<listitem><simpara>names the release version.  For example, the
462
 
packages in the tree might belong to Debian GNU/Linux release
463
 
version 3.0.  Note that there is normally no version number for the
 
463
packages in the tree might belong to Debian release
 
464
version &stable-version;.  Note that there is normally no version number for the
464
465
<literal>testing</literal> and <literal>unstable</literal> distributions because they
465
466
have not been released yet.  Specifying this in the APT preferences
466
467
file would require one of the following lines.
467
468
</simpara>
468
469
 
469
470
<programlisting>
470
 
Pin: release v=3.0
471
 
Pin: release a=stable, v=3.0
472
 
Pin: release 3.0
 
471
Pin: release v=&stable-version;
 
472
Pin: release a=stable, v=&stable-version;
 
473
Pin: release &stable-version;
473
474
</programlisting>
474
475
 
475
476
</listitem>