:: Re: [Dng] Package Versions
Página Inicial
Delete this message
Reply to this message
Autor: Noel Torres
Data:  
Para: dng
Assunto: Re: [Dng] Package Versions
On Thursday, 29 de January de 2015 18:10:10 Hendrik Boom escribió:
> So the upgrade to devuan should perhaps introduce the pin?
> And how soes that pinning work? Simply forbidding systemd and
> some of its relatives? Or a way te detect devuan packages and
> if they are present to ignore Debian's corresponding ones despite
> any version numbers the Debian ones carry?


Pinning works by saying "this repository has bigger priority than that one, no
matter the version numbers on the packages".

Technically, each package version has a priority. This is hardcoded:

(Extract from man apt_preferences(5))
=====
apt-get(8) selects the version with the highest priority for installation.

priority 100
to the version that is already installed (if any).

priority 500
to the versions that are not installed and do not belong to the target
release.

priority 990
to the versions that are not installed and belong to the target release.

APT then applies the following rules, listed in order of precedence, to
determine which version of a package to install:

Never downgrade unless the priority of an available version exceeds 1000.
("Downgrading" is installing a less recent version of a package in place of a
more recent version. Note that none of APT's default priorities exceeds 1000;
such high priorities can only be set in the preferences file. Note also that
downgrading a package can be risky.)
Install the highest priority version.
If two or more versions have the same priority, install the most recent one
(that is, the one with the higher version number).
If two or more versions have the same priority and version number but either
the packages differ in some of their metadata or the --reinstall option is
given, install the uninstalled one.
=====

Given that, if we pin our repository to 1001, it will always have bigger
priority than Debian's, even if Debian version is higher than ours, and even
if we are trying to downgrade from a higher Debian version to a lower Devuan
one.

Regards

Noel
er Envite