Wajig displays incorrect new and upgradeable package count

Bug #892410 reported by Jouni Karlsson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wajig (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu 11.10
Release: 11.10

wajig:
  Installed: 2.2

foo@bar:~$ wajig update
--- snip ---
Fetched 3,988 B in 4s (996 B/s)
Reading package lists... Done
This is the same as the previous count with 0 new packages.
There are 30 new upgrades
foo@bar:~$ wajig dist-upgrade
No upgrades. Did you run "wajig update" beforehand?
foo@bar:~$

Same goes if wajig claims "new" packages, doing "wajig new" lists either different number of packages or none.

Revision history for this message
Tshepang Lekhonkhobe (tshepang) wrote : Re: [Bug 892410] [NEW] Wajig displays incorrect new and upgradeable package count

I am failing to reproduce this. Are you able to?

Revision history for this message
Graeme Hewson (ghewson) wrote :

I can reproduce it. The problem (in my case, anyway) is due to the fact that a package might be available from more than one source, and wajig is including all these in its calculation, while only one version of a package can be installed, of course.

I've written a bash script to simulate "wajig update", which I'm attaching. It doesn't issue "apt-get update", but works with the current apt and dpkg files. Then instead of displaying a count, it displays the problematical packages. It doesn't need root. When I run the script, I get:

bash wajsim
libmysqlclient16 5.1.61-0ubuntu0.11.10.1 5.1.58-1ubuntu5 5.1.61-0ubuntu0.11.10.1

Revision history for this message
Graeme Hewson (ghewson) wrote :

Attaching extract from output of "apt-cache dumpavail" with duplicate entries for libmysqlclient16.

Revision history for this message
Graeme Hewson (ghewson) wrote :

Looks as though this is a duplicate of bug 325002

Revision history for this message
Graeme Hewson (ghewson) wrote :

It looks as though the problem is really that i386 and amd64 versions of a library or package might be installed, and these are counted separately. The versions might be found in the output from "apt-cache dumpavail" or in /var/lib/dpkg/status. On the other hand, "wajig toupgrade" doesn't discriminate between architectures and only shows the package once.

Attached is a patch to sort uniquely, so the counts from "wajig upgrade" match the count of lines from "wajig toupgrade".

Revision history for this message
Tshepang Lekhonkhobe (tshepang) wrote : Re: [Bug 892410] Re: Wajig displays incorrect new and upgradeable package count

On Tue, Apr 10, 2012 at 16:45, Graeme Hewson <email address hidden> wrote:
> It looks as though the problem is really that i386 and amd64 versions of
> a library or package might be installed, and these are counted
> separately. The versions might be found in the output from "apt-cache
> dumpavail" or in /var/lib/dpkg/status. On the other hand, "wajig
> toupgrade" doesn't discriminate between architectures and only shows the
> package once.
>
> Attached is a patch to sort uniquely, so the counts from "wajig upgrade"
> match the count of lines from "wajig toupgrade".

Thanks a lot for this patient analysis.

> ** Patch added: "wajig.counts.patch"
>   https://bugs.launchpad.net/ubuntu/+source/wajig/+bug/892410/+attachment/3040613/+files/wajig.counts.patch

I have just enabled multi-arch, so I can test this (I use Debian).

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "wajig.counts.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Tshepang Lekhonkhobe (tshepang) wrote : Re: [Bug 892410] Re: Wajig displays incorrect new and upgradeable package count

On Tue, Apr 10, 2012 at 17:14, Tshepang Lekhonkhobe <email address hidden> wrote:
>> ** Patch added: "wajig.counts.patch"
>>   https://bugs.launchpad.net/ubuntu/+source/wajig/+bug/892410/+attachment/3040613/+files/wajig.counts.patch
>
> I have just enabled multi-arch, so I can test this (I use Debian).

I committed to the VCS. You mind testing?

setup:
$ wajig install devscripts
$ hg clone https://wajig.googlecode.com/hg
$ cd wajig

build + install:
$ debuild -us -uc -b
$ sudo debi

Revision history for this message
Graeme Hewson (ghewson) wrote :

Thanks, that looks good (I had to cd to hg, not wajig, and install debhelper as well).

I'd just make a small criticism (of my own work!) that I think the comment in update_evailable should be reformatted to fit into 80 columns.

Revision history for this message
Tshepang Lekhonkhobe (tshepang) wrote :

On Tue, Apr 10, 2012 at 21:13, Graeme Hewson <email address hidden> wrote:
> Thanks, that looks good (I had to cd to hg, not wajig, and install
> debhelper as well).

http://code.google.com/p/wajig/source/detail?r=3351a6360589c9ed2a257545a84f8b6215c8f936

> I'd just make a small criticism (of my own work!) that I think the
> comment in update_evailable should be reformatted to fit into 80
> columns.

http://code.google.com/p/wajig/source/detail?r=ff3fa8c43c5ecc38ae0888e9f9959a9156ce6722

Thanks much.

Changed in wajig (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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