diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-16 22:44:56 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-16 22:44:56 +0200 |
commit | f5187016939c45c041c7d857bd6380e601410e96 (patch) | |
tree | 51ecfc5b6996300e1b2c6ac7b9727e5d110f5d8a /portato/backend | |
parent | 9efcbd2805c439f34e5bdad1ac8ad05803d4a9cd (diff) | |
download | portato-f5187016939c45c041c7d857bd6380e601410e96.tar.gz portato-f5187016939c45c041c7d857bd6380e601410e96.tar.bz2 portato-f5187016939c45c041c7d857bd6380e601410e96.zip |
Do not update packages, if the package to update to is masked and the current installed package matches the criterion already.
Diffstat (limited to '')
-rw-r--r-- | portato/backend/portage/package.py | 8 | ||||
-rw-r--r-- | portato/backend/portage/system.py | 11 |
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): |