summaryrefslogtreecommitdiff
path: root/portato/backend
diff options
context:
space:
mode:
Diffstat (limited to 'portato/backend')
-rw-r--r--portato/backend/portage/package.py8
-rw-r--r--portato/backend/portage/system.py11
2 files changed, 11 insertions, 8 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 591afd6..dc3cde3 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -200,13 +200,7 @@ class PortagePackage (Package):
deps = deps[1]
- retlist = []
-
- for d in deps:
- if not d[0] == "!":
- retlist.append(d)
-
- return retlist
+ return [d for d in deps if d[0] != "!"]
def get_dep_packages (self, depvar = ["RDEPEND", "PDEPEND", "DEPEND"], with_criterions = False):
dep_pkgs = [] # the package list
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index ae17d75..ef3feb9 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -443,8 +443,17 @@ class PortageSystem (SystemInterface):
if not bm:
warning(_("Bug? No best match could be found for '%(package)s'. Needed by: '%(cpv)s'."), {"package" : i, "cpv": p.get_cpv()})
else:
- for pkg in bm:
+ for pkg in bm:
if not pkg: continue
+ if pkg.is_masked() or pkg.is_testing(True): # check to not update unnecessairily
+ cont = False
+ for inst in self.find_installed_packages(pkg.get_cp(), only_cpv = True):
+ if self.cpv_matches(inst, i):
+ debug("The installed %s matches %s. Discarding upgrade to masked version.", inst, i)
+ cont = True
+ break
+ if cont: continue
+
check(pkg, state[1], appended) # XXX: should be 'or'ed with prev_appended?
for p in self.get_new_packages(packages):