From 450af26202424bef33e0c58f3f99dfd0c21e7297 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 17 Jan 2020 13:18:03 +0100 Subject: policy: Implement pinning by source package This implements the src: syntax inside policy, allowing you to pin by source package. This by default only pins the native architecuture, use src:pkg:any to pin for all architectures in your cache. Closes: #166032 --- doc/apt_preferences.5.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') diff --git a/doc/apt_preferences.5.xml b/doc/apt_preferences.5.xml index cac9a96e1..dacf3dc21 100644 --- a/doc/apt_preferences.5.xml +++ b/doc/apt_preferences.5.xml @@ -303,7 +303,28 @@ a &glob; expression in itself. +Pinning by source package +APT supports pinning by source packages. To pin by a source package, +prepend "src:" to the package name. +For example, to pin all binaries produced by the apt source package +of this APT's version to 990, you can do: + +Package: src:apt +Pin: version &apt-product-version; +Pin-Priority: 990 + + +Source package pinning can be combined with regular expressions and +glob patterns, and can also take a binary architecture. +For example, let's pin all binaries for all architectures produced by +any source package containing apt in its name to 990: + +Package: src:*apt*:any +Pin: version * +Pin-Priority: 990 + + -- cgit v1.2.3