update-notifier can miscount updates when present in both -updates and -security

Bug #381095 reported by Emmet Hikory
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: update-notifier

update-notifier can present confusing information to the user in the motd after miscounting the packages available for update in the case where a package may be updated from both the -updates and the -security repositories. An example fragment of motd output might be:

1 package can be updated.
2 updates are security updates.

In this case, the affected package has the following apt-cache policy:

ntpdate:
  Installed: 1:4.2.4p4+dfsg-7ubuntu5
  Candidate: 1:4.2.4p4+dfsg-7ubuntu5.1
  Version table:
     1:4.2.4p4+dfsg-7ubuntu5.1 0
        500 http://ports.ubuntu.com jaunty-updates/main Packages
        500 http://ports.ubuntu.com jaunty-security/main Packages
 *** 1:4.2.4p4+dfsg-7ubuntu5 0
        500 http://ports.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Evan Broder (broder) wrote :

I observed this on my machine today:

mathias:~ evan$ cat /etc/motd | tail -n 3
4 packages can be updated.
8 updates are security updates.

mathias:~ evan$ apt-cache policy libsasl2-2
libsasl2-2:
  Installed: 2.1.22.dfsg1-23ubuntu3
  Candidate: 2.1.22.dfsg1-23ubuntu3.1
  Version table:
     2.1.22.dfsg1-23ubuntu3.1 0
        500 http://localhost jaunty-updates/main Packages
        500 http://localhost jaunty-security/main Packages
 *** 2.1.22.dfsg1-23ubuntu3 0
        500 http://localhost jaunty/main Packages
        100 /var/lib/dpkg/status

Changed in update-notifier (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Could you please try the latest:
http://bazaar.launchpad.net/%7Eubuntu-core-dev/update-notifier/ubuntu/annotate/head%3A/data/apt_check.py

and see if that fixes the problem? (python apt_check.py --human-readable)

Changed in update-notifier (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Evan Broder (broder) wrote :

Works for me:

mathias:~ evan$ /usr/lib/update-notifier/apt-check --human-readable
5 packages can be updated.
10 updates are security updates.
mathias:~ evan$ python apt_check.py --human-readable
5 packages can be updated.
5 updates are security updates.

Changed in update-notifier (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 394958, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

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.