aptitude %V displays confusing "candidate version or <none>"

Bug #1317193 reported by Thomas Schweikle on 2014-05-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aptitude (Ubuntu)
Undecided
Unassigned

Bug Description

Assume only standard Ubuntu repositories configured:

apt-get clean all
apt-get update
apt-get upgrade
apt-get install vlc

should clean all repository caches, update the package databases, then upgrade all available non essential packages and finally install vlc.

Now you are working with vlc and something does not work as expected. You are trying the latest nightly packages from the videolan project, by adding their repository, by adding a file to /etc/apt/sources.list.d holding:

deb http://ppa.launchpad.net/videolan/master-daily/ubuntu trusty main
deb-src http://ppa.launchpad.net/videolan/master-daily/ubuntu trusty main

after doing

apt-get update
apt-get upgrade

the latest nightly builds of all vlc-packages are installed and you start testing. Next you remove the added repository, by commenting the lines in the above added file out. Then

apt-get clean all
apt-get update

Calling aptitude after will show no updates available. Searching for vlc will show the same version as installed and available in the repositories! This is wrong, since the version installed came from the videolan project nightly build and the repository given was disabled! aptitude shall show the version available now not the one installed!

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: aptitude 0.6.8.2-1ubuntu4
Uname: Linux 3.14.3+ x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
Date: Wed May 7 18:39:10 2014
InstallationDate: Installed on 2011-10-19 (930 days ago)
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: aptitude
UpgradeStatus: Upgraded to trusty on 2014-02-24 (71 days ago)

Thomas Schweikle (tps) wrote :
Thomas Schweikle (tps) wrote :
Thomas Schweikle (tps) wrote :
Thomas Schweikle (tps) wrote :
Daniel Hartwig (wigs) wrote :

> Next you remove the added repository, by commenting the lines in the
> above added file out. Then
>
> apt-get clean all
> apt-get update
>
> Calling aptitude after will show no updates available.

Correct. “No updates” means that the current (installed) version is more recent than any other.

> Searching for vlc will show the same version as installed and
> available in the repositories! This is wrong, since the version
> installed came from the videolan project nightly build and the
> repository given was disabled! aptitude shall show the version
> available now not the one installed!

On the screenshots the second number is the candidate version. This is similar but not exactly the same thing as "the latest version available in configured repositories". From the users manual:

  [The candidate version is] the version of the package which
  would be installed if Package → Install (+) were issued on
  the package …

When the currently installed version is more recent than any other that version is also the candidate regardless of what is available in apt repositories.

Does that clarify things for you?

Changed in aptitude (Ubuntu):
status: New → Incomplete
Thomas Schweikle (tps) wrote :

This clarifies some things to me, but ( :-) ) it is confusing, since in case the package vanishes from any repository the candidate is shown as "<none>" (or "<keiner>" in german), indicating there is no package with this name available any more -- thus it would be more convenient and logical to have the candidate be the one which has the highest available version available in the repositories, not the one which is installed.

Daniel Hartwig (wigs) wrote :

> This clarifies some things to me, but ( :-) ) it is confusing,
> since in case the package vanishes from any repository the
> candidate is shown as "<none>" (or "<keiner>" in german),
> indicating there is no package with this name available any
> more

Right, that does seem inconsistent and I see in pkg_columnizer.cc
we are special-casing the idea that the package is "not
available".

> -- thus it would be more convenient and logical to have
> the candidate be the one which has the highest available
> version available in the repositories, not the one which is
> installed.

The concept of a candidate version is defined by apt, and
aptitude should not deviate from that (though in this case it
currently does). It may be just as clear to remove the special
case and report the current/candidate version accurately based on
apt instead of "<none>".

Changed in aptitude (Ubuntu):
status: Incomplete → New
summary: - aptitude doesn't correctly report the version of packages available
- within repositories
+ aptitude %V displays confusing "candidate version or <none>"
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers