[Bug 1238982] Re: apt-get installs newer version even when older one is explicitly requested
David Kalnischkies
1238982 at bugs.launchpad.net
Fri Oct 11 23:23:02 UTC 2013
This isn't a bug as such, its a design decision acted out.
If not requested otherwise, APT is installing for each package the version with the highest preference. No implicit derivations: This makes it as predictable as it is required for a low-level tool.
If you want mylib version 1 instead of the more preferred version 2,
than YOU have to tell APT explicitly that you want that. That a package
wants another version (even explicitly) isn't more important than what
the user wants (even if implicitly).
Note by the way that downgrading packages as suggested in the
stackoverflow answer is NOT SUPPORTED by Ubuntu/Debian. It will work for
many packages, but APT itself will never suggest a downgrade on its own
– only if the user forces it and in this case it is assumed that the
user actually knows what (s)he is doing as there is a chance that it
will not work (think of maintainerscripts and/or transitions from
conffile format v1 to v2).
** Changed in: apt (Ubuntu)
Status: New => Invalid
--
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/1238982
Title:
apt-get installs newer version even when older one is explicitly
requested
Status in “apt” package in Ubuntu:
Invalid
Bug description:
On Ubuntu 10.04 (with 0.7.25.3ubuntu9.14) and 12.04 (with
apt-0.8.16~exp12ubuntu10):
When a package depends on a specific, non-latest version of another package,
apt-get install fails with the error message
my_program : Depends: my_program-common (= 57.0.93) but 57.3.102 is to be installed
This has been mentioned before, e.g.
http://stackoverflow.com/questions/17999695/debian-package-dependencies-installing-specific-version-not-the-latest
but nobody thought to file a bug for it.
Here's a minimal test case with two versions of a library (mylib-1.0
and mylib-2.0), and an app (myapp-1.0) that depends explicitly on
mylib-1.0.
To view the test case, visit
http://kegel.com/linux/apt-dependency-version-bug
To reproduce:
wget http://kegel.com/linux/apt-dependency-version-bug.tgz
tar -xzvf apt-dependency-version-bug.tgz
cd apt-dependency-version-bug
sh demo.sh build
sh demo.sh install
This fails with output
+ apt-cache policy myapp mylib
myapp:
Installed: (none)
Candidate: 1.0
Version table:
1.0 0
500 file:/home/dank/mydebs1/ lucid/main Packages
mylib:
Installed: (none)
Candidate: 2.0
Version table:
2.0 0
500 file:/home/dank/mydebs2/ lucid/main Packages
1.0 0
500 file:/home/dank/mydebs1/ lucid/main Packages
+ sudo apt-get install myapp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
myapp: Depends: mylib (= 1.0) but 2.0 is to be installed
E: Broken packages
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1238982/+subscriptions
More information about the foundations-bugs
mailing list