Purpose: so that the installation of the packages obeys the rules defined by me and during the installation it was not necessary to specify where to install.
Rules (approximate):

  1. If the package is in jessie backports, then install from jessie backports
  2. If there is no package in jessie backports, then install from standard repositories
  3. From foobar.com to install the foobar package and some of its dependencies, regardless of whether they are in the debian native repositories
  4. No more packages from foobar.com

    # cat /etc/apt/apt.conf APT::Default-Release "jessie"; # cat /etc/apt/preferences Package: foobar dependence1 dependence2 Pin: origin "foobar.com" Pin-Priority: 993 Package: * Pin: origin "foobar.com" Pin-Priority: -10 Package: * Pin: release n=jessie Pin-Priority: 500 Package: * Pin: release n=jessie-backports Pin-Priority: 999 Package: * Pin: release n=jessie-updates Pin-Priority: 500 

Questions:

  1. Did I do the right thing?
  2. Will ordinary system updates / security updates from security.debian.org fail?
  3. Maybe I do not see anything, and there is a way to make it more elegant?
  4. Does higher priority (within the same range described in man apt_preferences) mean higher source priority? For example, the package is in two repositories. One has priority 991, the second has 992. Will the package be placed from the repository with priority 992?

    0