summaryrefslogtreecommitdiff
path: root/portato/gui/updater.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-06-19 11:23:24 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-06-19 11:23:24 +0200
commit48f046aec4df3b09906ca41e2c75ce7e0fb045a6 (patch)
tree5562fc5377f9592a6293735e8baf78230a1a48a6 /portato/gui/updater.py
parentbe7f3e89a19cadad856dae717836f9ed3a66c85d (diff)
parent52f04fc6cccffa7cf31a4d7eab9c9b341f77a293 (diff)
downloadportato-48f046aec4df3b09906ca41e2c75ce7e0fb045a6.tar.gz
portato-48f046aec4df3b09906ca41e2c75ce7e0fb045a6.tar.bz2
portato-48f046aec4df3b09906ca41e2c75ce7e0fb045a6.zip
Merged from trunk
Diffstat (limited to 'portato/gui/updater.py')
-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..ba46ffd 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..."), pv)
+ 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]