summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-06 16:01:06 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-06 16:01:06 -0700
commit1c4935f8cdd27736ea2d6c82609a4d041419b70e (patch)
treed2b9f974e281c282a165328343e1c117ca47378d
parentd306ffaab50cc43a287a57bb96cd40a7efbf4f95 (diff)
downloadportage-1c4935f8cdd27736ea2d6c82609a4d041419b70e.tar.gz
portage-1c4935f8cdd27736ea2d6c82609a4d041419b70e.tar.bz2
portage-1c4935f8cdd27736ea2d6c82609a4d041419b70e.zip
Delay variable definitions in _pkg_visibility_check until
they are needed.
-rw-r--r--pym/_emerge/depgraph.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index d765055ba..31f984d59 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2554,8 +2554,7 @@ class depgraph(object):
return pkg, existing
def _pkg_visibility_check(self, pkg, allow_missing_keywords=False):
- pkgsettings = self._frozen_config.pkgsettings[pkg.root]
- root_config = self._frozen_config.roots[pkg.root]
+
if pkg.visible:
return True
@@ -2566,6 +2565,9 @@ class depgraph(object):
if not allow_missing_keywords:
return False
+
+ pkgsettings = self._frozen_config.pkgsettings[pkg.root]
+ root_config = self._frozen_config.roots[pkg.root]
mreasons = _get_masking_status(pkg, pkgsettings, root_config)
if len(mreasons) == 1 and \
mreasons[0].hint == 'unstable keyword':