~packagekit/packagekit/ubuntu-maverick

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Description: Fix apt backend doResolve()
# Upstream: http://bugs.freedesktop.org/show_bug.cgi?id=16432
diff -urp PackageKit-0.2.2/backends/apt/aptDBUSBackend.py PackageKit-0.2.2.new/backends/apt/aptDBUSBackend.py
--- PackageKit-0.2.2/backends/apt/aptDBUSBackend.py	2008-06-03 09:43:32.000000000 -0400
+++ PackageKit-0.2.2.new/backends/apt/aptDBUSBackend.py	2008-06-19 12:09:32.000000000 -0400
@@ -528,8 +528,13 @@ class PackageKitAptBackend(PackageKitBas
         self.AllowCancel(False)
 
         #FIXME: Support candidates
-        if self._cache.has_key(name) and self.is_package_visible(pkg, filters):
-            self._emit_package(name)
+        pkg = None
+        if self._cache.has_key(name):
+            pkg = self._cache[name]
+            if not self._is_package_visible(pkg, filters):
+                pkg = None
+        if pkg:
+            self._emit_package(pkg)
             self.Finished(EXIT_SUCCESS)
         else:
             self.ErrorCode(ERROR_PACKAGE_NOT_FOUND,