From 1a4c9766e0b31795b5d9869c6a98c1bba8380faa Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 15 Apr 2011 12:52:45 +0200 Subject: * apt-pkg/policy.cc: - Allow pinning by glob() expressions, and regular expressions surrounded by slashes (the "/" character). --- doc/apt_preferences.5.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'doc') diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index 219da7cd1..55504f3e5 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -259,6 +259,49 @@ 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. Those, 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 -- cgit v1.2.3