[Bug 1238982] Re: apt-get installs newer version even when older one is explicitly requested

Dan Kegel dank at kegel.com
Sat Oct 12 21:02:45 UTC 2013


I've updated my test case at
http://kegel.com/linux/apt-dependency-version-bug/demo.sh.txt
to verify that pinning suffices for this use case.

-- 
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