Re: prevent apt from downgrading packages

2019-03-01 Thread Felix Rubio Dalmau
On divendres, 1 de març de 2019 10:45:48 CET Alexander V. Makartsev wrote:
> On 01.03.2019 13:27, Felix Rubio wrote:
> > Hi all,
> >
> > I have mix stable+testing (~1200 packages from stable, ~20
> > packages from testing). I have the following contents in
> > /etc/apt/preferences.d/pinning:
> >
> This is something you should not do in first place. [1]
> The right and safe way to run stable branch and install packages from
> other branches (eg testing) is to make backports of them. [2] This is
> why debian-backports branch exists.
> When doing it right way you won't need any pinning and if package you
> backported will hit stretch-backports branch and will be newer version
> it will be upgraded just as regular package.
> 
> [1] https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian
> [2] https://wiki.debian.org/SimpleBackportCreation
> 
> 

Thank you for your advice. I have moved to stretch-backports as many packages 
as I could (I have to see what I do with the few, ~5, remaining).

Regards!
Felix





prevent apt from downgrading packages

2019-03-01 Thread Felix Rubio

Hi all,

I have mix stable+testing (~1200 packages from stable, ~20 packages 
from testing). I have the following contents in 
/etc/apt/preferences.d/pinning:


Package: *
Pin: release a=stable
Pin-Priority: 1001

Package: *
Pin: release a=testing
Pin-Priority: 200

Package: *
Pin: release a=experimental
Pin-Priority: -10

Package: *
Pin: release a=unstable
Pin-Priority: -10

What happens is: after an apt update, I list the packages to be upgraded 
with apt list --upgradable, and I get only those that will be upgraded. 
However, when I run apt upgrade, I get a number of packages that will be 
downgraded. How can I prevent this downgrading from happening?


Thank you!
Felix