summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-05-27 22:35:50 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-05-27 22:35:50 +0200
commit91e0cff038076d1f79ac707cfc024a1d919a93a9 (patch)
treec2af3c9e306de30b8124301d4f4a5c025e41cd39 /portato/gui
parent411c08e7cfa9ddc5bf4930558f28f97ae91c92fa (diff)
downloadportato-91e0cff038076d1f79ac707cfc024a1d919a93a9.tar.gz
portato-91e0cff038076d1f79ac707cfc024a1d919a93a9.tar.bz2
portato-91e0cff038076d1f79ac707cfc024a1d919a93a9.zip
Also have masked package being looked up in the updater. Though this is still misbehavior, as packages shouldn't be masked at this point of time
Diffstat (limited to '')
-rw-r--r--portato/gui/updater.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/portato/gui/updater.py b/portato/gui/updater.py
index f293fbc..44bc4e1 100644
--- a/portato/gui/updater.py
+++ b/portato/gui/updater.py
@@ -15,7 +15,7 @@ from __future__ import absolute_import
from ..backend import system
import threading, subprocess, time
-from ..helper import debug, error
+from ..helper import debug, warning, error
class Updater (object):
"""
@@ -79,21 +79,26 @@ q
"""
self.stopEvent.set()
- def find (self, pv):
+ def find (self, pv, masked = False):
"""
As qlop only returns 'package-version' we need to assign it to a cpv.
This is done here.
"""
- pkgs = system.find_packages("=%s" % pv, only_cpv = True)
+ pkgs = system.find_packages("=%s" % pv, only_cpv = True, masked = masked)
if len(pkgs) > 1: # ambigous - try to find the one which is also in the iterators
for p in pkgs:
if p in self.iterators:
return p
elif not pkgs: # nothing found =|
- error(_("Trying to remove package '%s' from queue which does not exist in system."), pv)
- return None
+ if not masked:
+ warning(_("No unmasked version of package '%s' found. Trying masked ones. This normally should not happen..."))
+ return self.find(pv, True)
+
+ else:
+ error(_("Trying to remove package '%s' from queue which does not exist in system."), pv)
+ return None
else: # only one choice =)
return pkgs[0]