Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
APT Developers
apt
Commits
8d15f117
Verified
Commit
8d15f117
authored
3 years ago
by
Johannes Schauer Marin Rodrigues
Browse files
Options
Downloads
Patches
Plain Diff
doc/apt_preferences.5.xml: document Package field syntax
parent
13b3dede
No related branches found
No related tags found
1 merge request
!207
Improve documentation and tests for the Package pinning field
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/apt_preferences.5.xml
+24
-9
24 additions, 9 deletions
doc/apt_preferences.5.xml
with
24 additions
and
9 deletions
doc/apt_preferences.5.xml
+
24
−
9
View file @
8d15f117
...
...
@@ -282,11 +282,24 @@ condition is checked.
</refsect2>
<refsect2><title>
Regular expressions and
&glob;
syntax
</title>
<refsect2><title>
Matching packages in the Package field
</title>
<para>
The
<literal>
Package
</literal>
field specifies the package that a pinning
priority is applied to. The field can either contain a binary package name, a
source package name (prefixed with "src:"), a
&glob;
expression or a regular
expression (surrounded by slashes). Multiple package names,
&glob;
expressions
and regular expressions can be listed separated by whitespace in which case
the record will match any of the matched packages.
</para>
<para>
By default, only packages of the native architecture are matched. To
match binary packages of any architecture, add the
<literal>
:any
</literal>
suffix to the package name. You can also limit matching to a specific
architecture by appending the architecture name to the package name,
separated by a colon character.
</para>
<para>
APT also supports pinning by
&glob;
expressions, and regular
expressions surrounded by slashes. For example, the following
example assigns the priority 500 to all packages from
For example, the following example uses a glob expression and a regular
expression to assign 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).
...
...
@@ -320,12 +333,8 @@ pins first, so later specific pins override it.
The pattern "
<literal>
*
</literal>
" in a Package field is not considered
a
&glob;
expression in itself.
</para>
</refsect2>
<refsect2><title>
Pinning by source package
</title>
<para>
APT supports pinning by source packages. To pin by a source package,
prepend "src:" to the package name.
</para>
<para>
For example, to pin all binaries produced by the apt source package
<para>
To pin all binaries produced by the apt source package
of this APT's version to 990, you can do:
</para>
<programlisting>
...
...
@@ -343,6 +352,12 @@ Package: src:*apt*:any
Pin: version *
Pin-Priority: 990
</programlisting>
<para>
The
<literal>
:any
</literal>
suffix makes sure to select binary packages
from any architecture. Without that suffix, apt implicitly assumes the
<literal>
:native
</literal>
suffix which would only select packages from
the native architecture.
</para>
</refsect2>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment