summaryrefslogtreecommitdiff
path: root/portato/gui/updater.py
diff options
context:
space:
mode:
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..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]