diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-27 19:52:09 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-27 19:52:09 +0000 |
commit | 0f19cbfa88913e79c0b82ef79fa9976ceaa21ce5 (patch) | |
tree | 4b669c011bd36c1cd70d403034f77c5957c6ec6d | |
parent | 0c9f9b277dc1bfec2550ebf7a573d85fe400ef44 (diff) | |
download | portage-0f19cbfa88913e79c0b82ef79fa9976ceaa21ce5.tar.gz portage-0f19cbfa88913e79c0b82ef79fa9976ceaa21ce5.tar.bz2 portage-0f19cbfa88913e79c0b82ef79fa9976ceaa21ce5.zip |
Bug #219369 - Enable automatic upgrage or downgrade to a version
with visible KEYWORDS when the installed version is masked by
KEYWORDS, but never reinstall the same exact version only due to
a KEYWORDS mask.
svn path=/main/trunk/; revision=10001
-rw-r--r-- | pym/_emerge/__init__.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index c3c4a896a..e853d8fb8 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2795,6 +2795,26 @@ class depgraph(object): continue except portage.exception.InvalidDependString: continue + + # Enable upgrage or downgrade to a version + # with visible KEYWORDS when the installed + # version is masked by KEYWORDS, but never + # reinstall the same exact version only due + # to a KEYWORDS mask. + if installed and matched_packages and \ + pkgsettings.getMissingKeywords( + pkg.cpv, pkg.metadata): + different_version = None + for avail_pkg in matched_packages: + if not portage.dep.cpvequal( + pkg.cpv, avail_pkg.cpv): + different_version = avail_pkg + break + if different_version is not None: + # Only reinstall for KEYWORDS if + # it's not the same version. + continue + if not built and not calculated_use: # This is avoided whenever possible because # it's expensive. |