Doesn't provide info about the type of an update
Bug #250970 reported by
James Westby
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
Changed in packagekit: | |
status: | Unknown → Confirmed |
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.
Example code for this can be found in UpdateManager.py:
def matchPackageOri gin(self, pkg, matcher):
installedV ersion and candidateVersion into account too
-updates (as v1.2) and -security (v1.1). we want to display GetCandidateVer (pkg._pkg)
update_ origin = matcher[ (None,None) ] VersionList:
apt_pkg. VersionCompare( ver.VerStr, inst_ver.VerStr) <= 0):
#print "skipping '%s' " % ver.VerStr
continue
for( verFileIter, index) in ver.FileList: 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
""" match 'pkg' origin against 'matcher', take versions between
Useful if installed pkg A v1.0 is available in both
it as a security update then
"""
inst_ver = pkg._pkg.CurrentVer
cand_ver = self._depcache.
# init with empty match
for ver in pkg._pkg.
# discard is < than installed ver
if (inst_ver and
# check if we have a match
if matcher.
return update_origin
self.matcher = self.initMatche r(dist)
def initMatcher(self, dist): 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),
matcher[ (origin, archive)] = self.UpdateOrig in(desc, importance) (None,None) ] = self.UpdateOrig in(_("Other updates"), -1)
# (origin, archive, description, importance)
matcher_
(dist, "Ubuntu", _("Distribution updates"), 6)
]
matcher = {}
for (origin, archive, desc, importance) in matcher_templates:
matcher[
return matcher
Thanks,
James