apt-show-versions cannot show jaunty-update

Bug #390937 reported by Kazuhiro NISHIYAMA
44
This bug affects 9 people
Affects Status Importance Assigned to Milestone
apt-show-versions (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

apt-show-versions 0.15 ignores version in jaunty-updates.

example:
% LANG=C apt-cache policy compiz
compiz:
  Installed: 1:0.8.2-0ubuntu8
  Candidate: 1:0.8.2-0ubuntu8.1
  Version table:
     1:0.8.2-0ubuntu8.1 0
        500 http://jp.archive.ubuntu.com jaunty-updates/main Packages
 *** 1:0.8.2-0ubuntu8 0
        500 http://jp.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status
% apt-show-versions compiz
compiz 1:0.8.2-0ubuntu8 installed: No available version in archive
%

When ubuntu, %releasenames has following keys and values:

%releasenames = {
          'archive.ubuntulinux.jp_ubuntu_dists_jaunty' => {
                                                            'Suite' => 'jaunty',
                                                            'Name' => 'jaunty',
                                                            'Codename' => 'jaunty'
                                                          },
          'jp.archive.ubuntu.com_ubuntu_dists_jaunty-security' => {
                                                                    'Suite' => 'jaunty-security',
                                                                    'Name' => 'jaunty-security',
                                                                    'Codename' => 'jaunty'
                                                                  },
          'archive.ubuntulinux.jp_ubuntu-ja_jaunty-non-free' => {
                                                                  'Suite' => 'jaunty-non-free',
                                                                  'Name' => 'jaunty-non-free',
                                                                  'Codename' => 'jaunty-non-free'
                                                                },
          'jp.archive.ubuntu.com_ubuntu_dists_jaunty' => {
                                                           'Suite' => 'jaunty',
                                                           'Name' => 'jaunty',
                                                           'Codename' => 'jaunty'
                                                         },
          'dl.google.com_linux_deb_dists_stable' => {
                                                      'Suite' => 'stable',
                                                      'Name' => 'stable',
                                                      'Codename' => 'stable'
                                                    },
          'jp.archive.ubuntu.com_ubuntu_dists_jaunty-updates' => {
                                                                   'Suite' => 'jaunty-updates',
                                                                   'Name' => 'jaunty-updates',
                                                                   'Codename' => 'jaunty'
                                                                 },
          'archive.canonical.com_ubuntu_dists_jaunty' => {
                                                           'Suite' => 'jaunty',
                                                           'Name' => 'jaunty',
                                                           'Codename' => 'jaunty'
                                                         }
        };

And at following code in sub determine_pkgfile_release,
when $pkgfile eq 'jp.archive.ubuntu.com_ubuntu_dists_jaunty-updates_main_binary-i386_Packages',
it matches 'jp.archive.ubuntu.com_ubuntu_dists_jaunty-updates' and 'jp.archive.ubuntu.com_ubuntu_dists_jaunty'.
It looks that 'jp.archive.ubuntu.com_ubuntu_dists_jaunty' checked early,
then sub determine_pkgfile_release returns 'jaunty' even if it should be returns 'jaunty-updates'.

    foreach (keys %releasenames) {
        return $_ if ($_ eq substr($pkgfile, 0, length($_)));
    }

Kazuhiro NISHIYAMA (znz)
description: updated
Revision history for this message
Kazuhiro NISHIYAMA (znz) wrote :

I use following workaround now.

    foreach (sort {length($b)<=>length($a)} keys %releasenames) {
        return $_ if ($_ eq substr($pkgfile, 0, length($_)));
    }

Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

Confirmed. And it still repros in 0.16. Though I have the karmic repos configured too with a priority of 400 in my apt/preferences file which seems to make it mistakenly report the release as "karmic" and think that the package is upgradeable when it's not.

$ apt-show-versions serpentine
serpentine/karmic *manually* upgradeable from 0.9-5ubuntu4.1 to 0.9-6ubuntu1
$ apt-cache policy serpentine
serpentine:
  Installed: 0.9-5ubuntu4.1
  Candidate: 0.9-5ubuntu4.1
  Version table:
     0.9-6ubuntu1 0
        400 http://archive.ubuntu.com karmic/universe Packages
 *** 0.9-5ubuntu4.1 0
        500 http://archive.ubuntu.com jaunty-updates/universe Packages
        100 /var/lib/dpkg/status
     0.9-5ubuntu4 0
        500 http://archive.ubuntu.com jaunty/universe Packages
$ cat /etc/apt/preferences
Package: *
Pin: release a=karmic
Pin-Priority: 400
$

Changed in apt-show-versions (Ubuntu):
status: New → Confirmed
Revision history for this message
Reuben Thomas (rrt) wrote :

This bug is still present in oneiric, and hence (because it has the same version of apt-show-versions) precise.

Revision history for this message
Reuben Thomas (rrt) wrote :

This bug is still present in quantal.

Revision history for this message
Reuben Thomas (rrt) wrote :

I'm sorry, I mean to say this bug is NOT still present in quantal. Perhaps the fix could be backported? The fix is the same as that mentioned above, and was added in 0.18.

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.