Doesn't provide info about the type of an update

Bug #250970 reported by James Westby
2
Affects Status Importance Assigned to Milestone
PackageKit
Fix Released
High
packagekit (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: packagekit

Hi,

Updates are only listed as INFO_INSTALLED, rather than as INFO_SECURITY,
INFO_BUGFIX or INFO_ENHANCEMENT, etc.

Thanks,

James

Revision history for this message
In , James Westby (james-w) wrote :

Example code for this can be found in UpdateManager.py:

    def matchPackageOrigin(self, pkg, matcher):
        """ match 'pkg' origin against 'matcher', take versions between
            installedVersion and candidateVersion into account too
            Useful if installed pkg A v1.0 is available in both
            -updates (as v1.2) and -security (v1.1). we want to display
            it as a security update then
        """
        inst_ver = pkg._pkg.CurrentVer
        cand_ver = self._depcache.GetCandidateVer(pkg._pkg)
        # init with empty match
        update_origin = matcher[(None,None)]
        for ver in pkg._pkg.VersionList:
            # discard is < than installed ver
            if (inst_ver and
                apt_pkg.VersionCompare(ver.VerStr, inst_ver.VerStr) <= 0):
                #print "skipping '%s' " % ver.VerStr
                continue
            # check if we have a match
            for(verFileIter,index) in ver.FileList:
                if matcher.has_key((verFileIter.Archive, verFileIter.Origin)):
                    indexfile = pkg._list.FindIndex(verFileIter)
                    if indexfile: # and indexfile.IsTrusted:
                        match = matcher[verFileIter.Archive, verFileIter.Origin]
                        if match.importance > update_origin.importance:
                            update_origin = match
        return update_origin

    self.matcher = self.initMatcher(dist)

  def initMatcher(self, dist):
      # (origin, archive, description, importance)
      matcher_templates = [
          ("%s-security" % dist, "Ubuntu", _("Important security updates"),10),
          ("%s-updates" % dist, "Ubuntu", _("Recommended updates"), 9),
          ("%s-proposed" % dist, "Ubuntu", _("Proposed updates"), 8),
          ("%s-backports" % dist, "Ubuntu", _("Backports"), 7),
          (dist, "Ubuntu", _("Distribution updates"), 6)
      ]
      matcher = {}
      for (origin, archive, desc, importance) in matcher_templates:
          matcher[(origin, archive)] = self.UpdateOrigin(desc, importance)
      matcher[(None,None)] = self.UpdateOrigin(_("Other updates"), -1)
      return matcher

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Binary package hint: packagekit

Hi,

Updates are only listed as INFO_INSTALLED, rather than as INFO_SECURITY,
INFO_BUGFIX or INFO_ENHANCEMENT, etc.

Thanks,

James

Changed in packagekit:
importance: Undecided → Medium
status: New → Triaged
Changed in packagekit:
status: Unknown → Confirmed
Revision history for this message
In , Sebastian Heinlein (glatzor) wrote :

This is already fixed in 0.3.0.

I adapted and pushed the code which reports updates as security updates if they succeed one some minutes ago.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Should be fixed in the 0.3 series

Changed in packagekit:
status: Triaged → Fix Committed
Changed in packagekit:
status: Confirmed → Fix Released
Changed in packagekit:
status: Fix Committed → Fix Released
Changed in packagekit:
importance: Unknown → High
Changed in packagekit:
importance: High → Unknown
Changed in packagekit:
importance: Unknown → High
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.