APT shows same-version packages as upgradable when the packages are the same version but are different (e.g. one from debian, one from ubuntu)

Bug #87114 reported by chastell
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: apt

If two sources provide the same version of a package, that package is forever upgradable in APT/aptitude. This happens even if one of the sources has negative priority:

shot@devielle:~$ cat /etc/apt/preferences
Package: *
Pin: release a=feisty-backports
Pin-Priority: -1

Package: *
Pin: release o=Debian
Pin-Priority: -1
shot@devielle:~$ apt-cache policy pkg-config
pkg-config:
  Installed: 0.21-1
  Candidate: 0.21-1
  Version table:
     0.21-1 0
         -1 http://ftp.debian.org unstable/main Packages
     0.21-1 0
        500 http://archive.ubuntu.com feisty/main Packages
 *** 0.21-1 0
        100 /var/lib/dpkg/status

The package pkg-config is forever upgradable (and aptitude installs the Ubuntu and Debian versions alternatively) unless I remove the Debian repositories from my config.

Tags: lucid
Revision history for this message
chastell (chastell) wrote :

The above only happens when the version numbers are equal; if the low-pinned version is newer, it’s not up for an upgrade:

shot@devielle:~$ apt-cache policy apt
apt:
  Installed: 0.6.46.4ubuntu7
  Candidate: 0.6.46.4ubuntu7
  Version table:
     0.7.0 0
         -1 http://ftp.debian.org experimental/main Packages
 *** 0.6.46.4ubuntu7 0
        500 http://archive.ubuntu.com feisty/main Packages
        100 /var/lib/dpkg/status
     0.6.46.4 0
         -1 http://ftp.debian.org unstable/main Packages

Revision history for this message
Michael Vogt (mvo) wrote :

This happens when two packages with the same version number are not equal. Apt does not support packages with the same version nubmer that are different .

Changed in apt:
status: Unconfirmed → Confirmed
Revision history for this message
chastell (chastell) wrote :

Is there an easy way to fix this (even in an ugly manner, just for personal use)?

Now that Feisty went stable, I’d love to track versions of certain packages in Gutsy and Debian unstable; I initially used madison-lite for this, but switched to APT+pinning as the more universal and useful solution.

Revision history for this message
Angel Olivera (redondos) wrote :

I'd like that too.

I am not sure if this is the same bug or a new one, so please give me your opinion and I will file another bug if necessary:

I am tracking feisty and debian unstable, I just want a few packages from the latter, so I set it with a priority of -1, but my installed packages (priority 100) are shown unlinked from the repository that they were supposedly installed, for example:

redondos@fuel ~ $ apt-cache policy antiword
antiword:
  Installed: 0.37-2
  Candidate: 0.37-2
  Version table:
     0.37-2 0
         -1 http://ftp.us.debian.org unstable/main Packages
     0.37-2 0
        990 http://ar.archive.ubuntu.com feisty/universe Packages
 *** 0.37-2 0
        100 /var/lib/dpkg/status

This causes apt to repeatedly install this package when performing an upgrade, which is -to say the least- not the expected behavior.

I know the reinstall of the package might be caused because of the lack of the source of installation in /var/lib/dpkg/status, but shouldn't a priority of -1 at least make apt refuse to install from that repository?

Thanks.

Revision history for this message
chastell (chastell) wrote :

Angel: this is exactly the same bug. It makes it impossible to track package numbers across different repositories if it happens that two repositories carry different packages with the same version number.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I confirm this is still present in lucid. In the rare case that I need to work around this problem, I just set the package in question to "hold" status in aptitude.

tags: added: lucid
Revision history for this message
dino99 (9d9) wrote :

Support for this version has ended

Changed in apt (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.