motd includes mathematically impossible numbers of updates

Bug #394958 reported by Dan Drake
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-notifier-common

Right now, /etc/motd says this:

15 packages can be updated.
18 updates are security updates.

...which seems to imply that three security updates cannot be installed. Yikes.

The problem is in the /usr/lib/update-notifier/apt-check script: in the section

       if cand_ver != inst_ver:
                # check for security upgrades
                upgrades = upgrades + 1
                if isSecurityUpgrade(cand_ver):
                    security_updates += 1
                # now check for security updates that are masked by a
                # canidate version from another repo (-proposed or -updates)
                for ver in pkg.VersionList:
                    if (inst_ver and apt_pkg.VersionCompare(ver.VerStr, inst_ver.VerStr) <= 0):
                        #print "skipping '%s' " % ver.VerStr
                        continue
                    if isSecurityUpgrade(ver):
                        security_updates += 1
                        break

it is double-counting some security updates. I have a patch which fixes this.

Related branches

Revision history for this message
Dan Drake (ddrake) wrote :
Revision history for this message
Dan Drake (ddrake) wrote :

I should add that I'm using Jaunty with update-notifier-common 0.76.7.

Revision history for this message
Dan Drake (ddrake) wrote :

Ack! I flipped the arguments to "diff -u". Please ignore the above patch (although it's simple enough to see what it's supposed to do) and use this one.

Changed in update-notifier (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.10-beta
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :
Changed in update-notifier (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.86

---------------
update-notifier (0.86) karmic; urgency=low

  [ Sebastien Bacher ]
  * debian/rules:
    - build using --as-needed to reduce the depends

  [ Dustin Kirkland ]
  * debian/update-notifier-common.dirs: update-notifier-common
    needs /etc/update-motd.d, rather than /etc/update-motd.d/hourly;
    causes this directory to *not* be removed on update-motd package
    removal/upgrade

  [ Michael Vogt ]
  * src/update-notifier.c:
    - if display can not be opened, show a propper error message
      and do not crash (LP: #317745)
  * src/apt_check.py:
    - count security updates correctly even when they are "shadowed"
      by a regular update (LP: #394958)
    - fix typo (thanks to Hew McLachlan)
  * data/update-motd-updates-available, debian/99update-notifier:
    - move updates available from /var/run to /var/lib/update-notifier
      to make it persistent over reboots
  * src/update-notifier.c:
    - make the timeout for no-activity from apt bigger (LP: #274001)
  * data/update-notifier.desktop.in:
    - better description for the auto startup (LP: #146918)
  * src/update-notifier.c:
    - use GAppInfo/GAppLaunchContext to provide startup notification
      support (LP: #46258)

 -- Michael Vogt <email address hidden> Tue, 14 Jul 2009 16:50:46 +0200

Changed in update-notifier (Ubuntu):
status: Fix Committed → Fix Released
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.