Package priority.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 10 Jan 2016 10:04:41 +0200
changeset 1860 7fe8efa766f4
parent 1859 048f61a3be91
child 1861 c28dba308db9
Package priority.
debian-apt.rst
--- a/debian-apt.rst	Sun Jan 10 09:57:09 2016 +0200
+++ b/debian-apt.rst	Sun Jan 10 10:04:41 2016 +0200
@@ -19,6 +19,9 @@
   deb http://ftp.uk.debian.org/debian/ experimental main contrib non-free
   deb http://www.deb-multimedia.org testing main non-free
 
+Package priority.
+=================
+
 ``/etc/apt/preferences``::
 
   Package: *
@@ -37,6 +40,30 @@
   Pin: release a=experimental
   Pin-Priority: 600
 
+Example that prevent installing ``*systemd*`` packages (priority strictly below
+``0`` forbid package to be installed)::
+
+  Package: systemd
+  Pin: origin ""
+  Pin-Priority: -1
+
+  Package: *systemd*
+  Pin: origin ""
+  Pin-Priority: -1
+
+Example that avoid installing packages from different distribution (priority
+strictly below ``100`` cause a version to be installed only if there is no
+installed version of the package), you should keep main distribution priority
+above foreign distro priority::
+
+  Package: *
+  Pin: release a=testing
+  Pin-Priority: 990
+
+  Package: *
+  Pin: release o=Kali
+  Pin-Priority: 50
+
 Debian releases.
 ================