Penguin
Blame: apt_preferences(5)
EditPageHistoryDiffInfoLikePages
Annotated edit history of apt_preferences(5) version 5, including all changes. View license author blame.
Rev Author # Line
1 perry 1 APT_PREFERENCES
2 !!!APT_PREFERENCES
3 NAME
4 DESCRIPTION
5 VERSIONING
6 CANDIDATE VERSION POLICY
7 SEE ALSO
8 BUGS
9 AUTHOR
10 ----
11 !!NAME
12
13
14 apt_preferences - Preference control file for APT
15 !!DESCRIPTION
16
17
18 The APT preferences file controls various aspects of the APT
19 system. It is meant to be user editable and manipulatable
20 from software. The file consists of a number of records
21 formed like the dpkg status file, space seperated sections
22 of text with at the start of each line tags seperated by a
23 colon. It is stored in
24 ''/etc/apt/preferences''.
25 !!VERSIONING
26
27
28 One purpose of the preferences file is to let the user
29 select which version of a package will be installed. This
30 selection can be made in a number of ways that fall into
31 three categories, version, release and origin.
32
33
34 Selection by version can be done by exact match or prefix
35 match. The format is 2.1.2 or 2.2* for a prefix match.
36 Matching by prefix can be used to ignore the r in the Debian
37 release versioning, like 2.1r* or to ignore Debian specific
38 revisions, 1.1-*. When matching versions with a prefix the
39 highest matching version will always be picked.
40
41
42 Selection by release is more complicated and has three
43 forms. The primary purpose of release selections is to
44 identify a set of packages that match a specific vendor, or
45 release (ie Debian 2.1). The first two forms are shortcuts
46 intended for quick command line use. If the first character
47 of the specification is a digit then it is considered to be
48 a release version match, otherwise a release label match.
49 Specifications which contain equals are full release data
50 matches and are a comma seperated list of one letter keys
51 followed by an equals then by the string.
52 Examples:
53
54
5 MishaGorodnitzky 55 __v=2.1*,o=Debian,c=main__%%%
56 __l=Debian__%%%
57 __a=stable__%%%
58
59
1 perry 60 The data for these matches are taken from the ''Release'' files that APT downloads during an update. The available keys are:
61
62
63 __a= Archive__
64
65
66 This is the common name we give our archives, such as stable
67 or unstable. The special name now is used to designate the
68 set of packages that are currently installed.
69
70
71 __c= Component__
72
73
74 Referes to the sub-component of the archive, main, contrib
75 etc. Component may be omitted if there are no components for
76 this archive.
77
78
79 __v= Version__
80
81
82 This is a version string with the same properties as in the
83 Packages file. It represents the release level of the
84 archive. Typical Debian release numbers look like 2.1r2 with
85 the r designating the release of 2.1. New releases are
86 limited to security updates and other important
87 changes.
88
89
90 __o= Origin__
91
92
93 This specifies who is providing this archive. In the case of
94 Debian the string will read Debian. Other providers may use
95 their own string.
96
97
98 __l= Label__
99
100
101 This carries the encompassing name of the distribution. For
102 Debian proper this field reads Debian. For derived
103 distributions it should contain their proper
104 name.
105
106
107 The final selection method is by origin. This is simply the
108 site name of the originating package files. The empty string
109 is used for file URIs.
110
111
112 Version selection, particularly the latter two methods, are
113 used in many different parts of APT, not just the
114 preferences file.
115 !!CANDIDATE VERSION POLICY
116
117
118 Internally APT maintains a list of all available versions
119 for all packages. If you place multiple releases or vendors
120 in your ''sources.list''(5) file then these features are
121 available. By default APT selects the highest version from
122 all automatic sources. Some sources, such as
123 ''project/experimental'' are marked Not Automatic - these
124 fall to the bottom of the selection pile.
125
126
127 When deciding what version to use APT assigns a priority to
128 each available version of the package. It then does two
129 things, first it selects the highest priorty version that is
130 newer than the installed version of the package, then it
131 selects the highest priority version that is older than the
132 installed version. Next, if the older versions have a
133 priority greater than 1000 they are compared with the
134 priority of the upgrade set, the larger becomes the selected
135 result. Otherwise the downgrade versions are ignored and the
136 highest priority of the ugprade set is
137 selected.
138
139
140 It is possible to think of the priorities in
141 strata:
142
143
144 __1000 and up__
145
146
147 Downgradable priorities
148
149
150 __1000__
151
152
153 The downgrade prevention barrier
154
155
156 __100 to 1000__
157
158
159 Standard priorities. 990 is the priority set by the
160 __--target-release apt-get__(8) option. 989 is the start
161 for auto priorities and 500 are all the default package
162 files.
163
164
165 __100__
166
167
168 The currently installed version
169
170
171 __0 to 100__
172
173
174 Non automatic priorities. These are only used if the package
175 is not installed and there is no other version
176 available.
177
178
179 __less than 0__
180
181
182 The version is never selected.
183
184
185 Giving a pin a priority greater than 1000 will allow APT to
186 downgrade in order to get to that version.
187
188
189 Each package may be pinned to a specific version and each
190 Packages file has a priority for every package inside. The
191 highest priority assigned to a package is the one that is
192 used.
193
194
195 A package pin looks like this:
196
197
5 MishaGorodnitzky 198 __Package: apt__%%%
199 __Pin: version 0.4.0__%%%
200 __Pin-Priority: 1001__%%%
201
202
1 perry 203 The first line specifies the package, the second gives the Pin specification and the last gives the priority of this pin. The first word of the pin specification may be version, release or origin, the remainder of the field is described in the Versioning section above.
204
205
206 A default pin is how the priorities of package files are
207 set. Any number of default pins may be specified, the first
208 matching default will select the priority of the package
209 file. Only release or origin may be used in the Pin
210 specification since they match Packages files.
211
212
5 MishaGorodnitzky 213 __Package: *__%%%
214 __Pin: release v=2.1*__%%%
215 __Pin-Priority: 998__%%%
216
1 perry 217 If the Pin-Priority field is omitted then the priority defaults to 989 for both cases.
218
219
220 __INTERESTING EFFECTS__
221
222
223 Due to the downgrade prevention barrier at priority 1000 it
224 is possible that a lower priority version will be selected
225 if the higher priority would cause a downgrade. For
226 instance, if package foo has versions 1.2, 1.1 and 1.0
227 installed, with 1.1 being the currently installed version
228 and the priorities of each version being 900, 100 and 950
229 repectively the winning version will be 1.2.
230
231
232 In practice this is often desired. A user may use a default
233 pin to make the stable distribution the default and then use
4 perry 234 the __--target-dist__ option with apt-get(8) to
1 perry 235 select newer versions from unstable. The packages that have
236 been upgraded to unstable will continue to follow the
237 versions that are available in unstable since the stable
238 versions now fall below the downgrade prevention
239 barrier.
240
241
242 If this is not desired then a default pin should be used to
243 make unstable have a priority less than 100.
244
245
246 Users of 3rd party add ons such as Helix GNOME can use this
247 mechanism to force the usage of Helix packages, or force the
248 usage of Debian packages by setting the priority of that
249 source sufficiently high. It is even possible to mass
250 downgrade from one set of packages to another by using a
251 priority larger than 1000.
252 !!SEE ALSO
253
254
4 perry 255 apt-cache(8) ''apt.conf''(5)
1 perry 256 !!BUGS
257
258
259 See the APT bug page
5 MishaGorodnitzky 260 ''/usr/share/doc/debian/bug-reporting.txt'' or the
1 perry 261 bug(1) command.
262 !!AUTHOR
263
264
265 APT was written by the APT team
266 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.