Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #205882
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: prevent apt from downgrading packages |
| Date | 2019-03-01 15:50 +0100 |
| Message-ID | <xwRE5-2OG-7@gated-at.bofh.it> (permalink) |
| References | <xwM1I-7L1-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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-
Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread
prevent apt from downgrading packages Felix Rubio <felix@kngnt.org> - 2019-03-01 09:50 +0100
Re: prevent apt from downgrading packages "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-03-01 10:50 +0100
Re: prevent apt from downgrading packages Andrea Borgia <andrea@borgia.bo.it> - 2019-03-01 11:10 +0100
Re: prevent apt from downgrading packages "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-03-01 11:20 +0100
Re: prevent apt from downgrading packages Andrea Borgia <andrea@borgia.bo.it> - 2019-03-01 20:50 +0100
Re: prevent apt from downgrading packages john doe <johndoe65534@mail.com> - 2019-03-01 11:20 +0100
Re: prevent apt from downgrading packages Felix Rubio Dalmau <felix@kngnt.org> - 2019-03-01 21:30 +0100
Re: prevent apt from downgrading packages Dan Ritter <dsr@randomstring.org> - 2019-03-01 15:50 +0100
csiph-web