PackageKit/PackageKit-0.6.13-smartBackend_fix_best_package.patch

15 lines
693 B
Diff

diff -Nru PackageKit-0.6.13.orig//backends/smart/smartBackend.py PackageKit-0.6.13/backends/smart/smartBackend.py
--- PackageKit-0.6.13.orig//backends/smart/smartBackend.py 2011-04-24 15:46:32.744153747 +0200
+++ PackageKit-0.6.13/backends/smart/smartBackend.py 2011-04-24 15:47:05.073518384 +0200
@@ -912,9 +912,9 @@
def _best_package_from_list(self, package_list):
for installed in (True, False):
best = None
for package in package_list:
- if not best or package > best:
+ if not best or (package.installed and not best.installed):
best = package
if best:
return best