[trusty] policy not always initialized when building depcache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Debian) |
Fix Released
|
Unknown
|
|||
apt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
apt in trusty does not always initialize the policy before constructing the depcache. This means that if you access the depcache, it does not respect pinning when calculating upgrades.
This is not a general problem - according to current knowledge, it only affects apt list. It does affect any code that requests a depCache from pkgCacheFile without having explicitly build caches, or explicitly initialized policy (which other parts of apt do).
[Test case]
1. Add deb https:/
2. Pin it down
Package: *
Pin: release trusty-
Pin-Priority: -1
3. Look at apt list apport
Currently it shows:
apport/
because when calculating whether the package is upgradable, it did not see the pinning.
Correct would be:
apport/
[Regression potential]
Behavior of code that only initializes depcache, but not policy will change. For example, pinning will be applied in such code (as it is in later versions, and should be). This adds some more error cases as well, such as parsing failures for preferences files.
Changed in apt (Ubuntu Trusty): | |
status: | Triaged → In Progress |
tags: | added: id-5d9e47ddb1dcee0e7664e479 |
Changed in apt (Debian): | |
status: | Unknown → Fix Released |
The fix is the first hunk in
https:/ /salsa. debian. org/apt- team/apt/ commit/ 592d06b6f3c2ef2 ae47c38005ae3c4 e96a0841f2