summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 0b2ad2c39..c606c089e 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6653,6 +6653,14 @@ class LazyBintreeItem(object):
self._bintree.populate()
return self._bintree
+# Initialization of legacy globals. No functions/classes below this point
+# please! When the above functions and classes become independent of the
+# below global variables, it will be possible to make the below code
+# conditional on a backward compatibility flag (backward compatibility could
+# be disabled via an environment variable, for example). This will enable new
+# code that is aware of this flag to import portage without the unnecessary
+# overhead (and other issues!) of initializing the legacy globals.
+
if os.environ.has_key("ROOT"):
root=os.environ["ROOT"]
if not len(root):