[Bug 1565782] [NEW] APT doesn't respect pin-priority when using APT::Default-Release option
Niklas Holm
1565782 at bugs.launchpad.net
Mon Apr 4 12:56:01 UTC 2016
Public bug reported:
I'm trying to pin packages from the proprietary graphics drivers PPA,
and I want APT to use this PPA even if a newer version is available in a
target release, so I put it at a pin-priority of 999
--- /etc/apt/preferences.d/graphics-drivers-ppa-pin-999
Package: *
Pin: release o=LP-PPA-graphics-drivers
Pin-Priority: 999
---
If I test this with 'apt-cache policy', the priorities seems to be
correct.
---
$ apt-cache policy nvidia-346
nvidia-346:
Installerad: 346.96-0ubuntu0~gpu14.04.2
Kandidat: 346.96-0ubuntu0~gpu14.04.2
Versionstabell:
352.63-0ubuntu0.14.04.1 0
500 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages
*** 346.96-0ubuntu0~gpu14.04.2 0
999 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
---
But if I use the 'APT::Default-Release' configuration option, the
priority gets lowered to 990, resulting in the wrong candidate.
---
$ apt-cache -o 'APT::Default-Release=trusty' policy nvidia-346
nvidia-346:
Installerad: 346.96-0ubuntu0~gpu14.04.2
Kandidat: 352.63-0ubuntu0.14.04.1
Versionstabell:
352.63-0ubuntu0.14.04.1 0
990 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages
990 http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages
*** 346.96-0ubuntu0~gpu14.04.2 0
990 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
---
The same thing happens when using apt-get/aptitude's '-t' flag, i.e. the
wrong version gets marked for installation. It seems the policy engine
sets the priority to 990 if the package matches the target release,
regardless of the previous (higher) value. I think this behavior is a
bug and should be fixed so that a certain package's priority doesn't get
lowered for belonging to the target release.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: apt 1.0.1ubuntu2.11
ProcVersionSignature: Ubuntu 3.13.0-83.127-generic 3.13.11-ckt35
Uname: Linux 3.13.0-83-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
Date: Mon Apr 4 14:11:26 2016
InstallationDate: Installed on 2014-08-08 (605 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
ProcEnviron:
TERM=xterm-256color
SHELL=/bin/bash
PATH=(custom, user)
LANG=sv_SE.UTF-8
XDG_RUNTIME_DIR=<set>
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: apt (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug trusty
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1565782
Title:
APT doesn't respect pin-priority when using APT::Default-Release
option
Status in apt package in Ubuntu:
New
Bug description:
I'm trying to pin packages from the proprietary graphics drivers PPA,
and I want APT to use this PPA even if a newer version is available in
a target release, so I put it at a pin-priority of 999
--- /etc/apt/preferences.d/graphics-drivers-ppa-pin-999
Package: *
Pin: release o=LP-PPA-graphics-drivers
Pin-Priority: 999
---
If I test this with 'apt-cache policy', the priorities seems to be
correct.
---
$ apt-cache policy nvidia-346
nvidia-346:
Installerad: 346.96-0ubuntu0~gpu14.04.2
Kandidat: 346.96-0ubuntu0~gpu14.04.2
Versionstabell:
352.63-0ubuntu0.14.04.1 0
500 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages
*** 346.96-0ubuntu0~gpu14.04.2 0
999 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
---
But if I use the 'APT::Default-Release' configuration option, the
priority gets lowered to 990, resulting in the wrong candidate.
---
$ apt-cache -o 'APT::Default-Release=trusty' policy nvidia-346
nvidia-346:
Installerad: 346.96-0ubuntu0~gpu14.04.2
Kandidat: 352.63-0ubuntu0.14.04.1
Versionstabell:
352.63-0ubuntu0.14.04.1 0
990 http://se.archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages
990 http://security.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages
*** 346.96-0ubuntu0~gpu14.04.2 0
990 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
---
The same thing happens when using apt-get/aptitude's '-t' flag, i.e.
the wrong version gets marked for installation. It seems the policy
engine sets the priority to 990 if the package matches the target
release, regardless of the previous (higher) value. I think this
behavior is a bug and should be fixed so that a certain package's
priority doesn't get lowered for belonging to the target release.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: apt 1.0.1ubuntu2.11
ProcVersionSignature: Ubuntu 3.13.0-83.127-generic 3.13.11-ckt35
Uname: Linux 3.13.0-83-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
Date: Mon Apr 4 14:11:26 2016
InstallationDate: Installed on 2014-08-08 (605 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
ProcEnviron:
TERM=xterm-256color
SHELL=/bin/bash
PATH=(custom, user)
LANG=sv_SE.UTF-8
XDG_RUNTIME_DIR=<set>
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1565782/+subscriptions
More information about the foundations-bugs
mailing list