Re: prevent apt from downgrading packages
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
Re: prevent apt from downgrading packages
Il 01/03/19 11:18, Alexander V. Makartsev ha scritto: This is something you have to decide for yourself and deal with unforeseen consequences. If you actually *build* packages from "stable" on "testing" system, using dependencies for building also from "testing" then it should be ok compatibility wise. If you simply *install* packages from various sources and branches then you asking for trouble. I'm installing from testing, except when the package was only available in stable. I haven't seen any particular issues so far, only problems I had were _before_ the upgrade when I had to purge a few packages and libraries from the old "debian-multimedia" repo... after that, the upgrade to testing went well and not a problem since. Il 01/03/19 11:18, john doe ha scritto:> On 3/1/2019 11:07 AM, Andrea Borgia wrote: There are no good answers here. It is up to you, all depends on your needs and environment. Noted. Thanks, Andrea.
Re: prevent apt from downgrading packages
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: > > 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? here are magic levels for the numbers in the priority field. They are explained, at length, in man apt_preferences. The highlights: P >= 1000 causes a version to be installed even if this constitutes a downgrade of the package 990 <= P < 1000 causes a version to be installed even if it does not come from the target release, unless the installed version is more recent 500 <= P < 990 causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent 100 <= P < 500 causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent 0 < P < 100 causes a version to be installed only if there is no installed version of the package P < 0 prevents the version from being installed Your downgrades are probably caused by the 1001 priority for stable; changing that to 999 might be what you want. -dsr-
Re: prevent apt from downgrading packages
On 01.03.2019 15:07, Andrea Borgia wrote: > > Il giorno ven 1 mar 2019 alle ore 10:46 Alexander V. Makartsev > mailto:avbe...@gmail.com>> ha scritto: > > On 01.03.2019 13:27, Felix Rubio wrote: >> 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] > > > I have a "testing" installation with "stable" as additional source, > meaning that in my case the numbers would probably be reversed. > Is that still a no-no ? > > Regards, > Andrea. > > This is something you have to decide for yourself and deal with unforeseen consequences. If you actually *build* packages from "stable" on "testing" system, using dependencies for building also from "testing" then it should be ok compatibility wise. If you simply *install* packages from various sources and branches then you asking for trouble. -- With kindest regards, Alexander. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄
Re: prevent apt from downgrading packages
On 3/1/2019 11:07 AM, Andrea Borgia wrote: > Il giorno ven 1 mar 2019 alle ore 10:46 Alexander V. Makartsev < > avbe...@gmail.com> ha scritto: > >> On 01.03.2019 13:27, Felix Rubio wrote: >> >> 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] >> > > I have a "testing" installation with "stable" as additional source, meaning > that in my case the numbers would probably be reversed. > Is that still a no-no ? > There are no good answers here. It is up to you, all depends on your needs and environment. -- John Doe
Re: prevent apt from downgrading packages
Il giorno ven 1 mar 2019 alle ore 10:46 Alexander V. Makartsev < avbe...@gmail.com> ha scritto: > On 01.03.2019 13:27, Felix Rubio wrote: > > 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] > I have a "testing" installation with "stable" as additional source, meaning that in my case the numbers would probably be reversed. Is that still a no-no ? Regards, Andrea.
Re: prevent apt from downgrading packages
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 -- With kindest regards, Alexander. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄
prevent apt from downgrading packages
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