summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Westby <jw+debian@jameswestby.net>2009-07-04 16:03:32 -0400
committerJames Westby <jw+debian@jameswestby.net>2009-07-04 16:03:32 -0400
commite071e723fd84494798351653a03e8094a0522d59 (patch)
treed711eb9f3574d728ebb87ca247b8a52cd201abdd
parent6bd9b2e5603f10da2eab51503f8a134a376dc759 (diff)
Ignore obsolete but not purged packages.
Packages that are in the "conffiles" state (removed but not purged) show up in the cache, but have no installed or candidate version, so we filter them.
-rwxr-xr-xbackends/apt/aptBackend.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/apt/aptBackend.py b/backends/apt/aptBackend.py
index df01c52ec..204b64645 100755
--- a/backends/apt/aptBackend.py
+++ b/backends/apt/aptBackend.py
@@ -713,6 +713,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
return
# FIXME add some real data
updates = self.get_id_from_package(pkg, force_candidate=False)
+ if updates is None:
+ continue
obsoletes = ""
vendor_url = ""
restart = "none"
@@ -1581,6 +1583,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
cand_origin = pkg.candidateOrigin
if not pkg.isInstalled or force_candidate:
version = pkg.candidateVersion
+ if version is None:
+ return None
if cand_origin:
origin = cand_origin[0].label
else:
@@ -1595,6 +1599,8 @@ class PackageKitAptBackend(PackageKitBaseBackend):
Send the Package signal for a given apt package
"""
id = self.get_id_from_package(pkg, force_candidate)
+ if id is None:
+ return
section = pkg.section.split("/")[-1]
if info == None:
if pkg.isInstalled: