# HG changeset patch # User Oleksandr Gavenko # Date 1452413081 -7200 # Node ID 7fe8efa766f4c8697eed36d4281276257f5e4e28 # Parent 048f61a3be91b78de7a8c8a0456bfc78d0400679 Package priority. diff -r 048f61a3be91 -r 7fe8efa766f4 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. ================