[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-pinning, strange behavior



On 10/10/13 22:06, Dmitrii Kashin wrote:
> berenger.morel@neutralite.org writes:
> 
>> In the same priority range, the package which will be installed is the
>> one with the highest priority, so it is fine to have one set of
>> package with 500 ( or I could take 600 or any other value ) for low
>> priority, and the other at 900 ( or 800 or... ), so that the version
>> with 900 will be installed against the lower one, even if the lower
>> one is more recent.
> 
> Oh... Truely? I thought differently and was sure I am right.
> 
> I just skimmed again through apt_preferences man page, but did not find
> such examples or explanations. Where's it documented?

For reference, the section in apt_preferences(5) that documents this is:
>     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.

As you can see, it uses the priority first, and then the version number.


Reply to: