Add a note concerning the separation of legacy global initializations.
authorZac Medico <zmedico@gentoo.org>
Mon, 24 Apr 2006 23:20:53 +0000 (23:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 24 Apr 2006 23:20:53 +0000 (23:20 -0000)
svn path=/main/trunk/; revision=3218

pym/portage.py

index 0b2ad2c39f01e6198620728ae98e5bcbbb76cf83..c606c089ed1cfde558adf3cdcb9b9fdf14479955 100644 (file)
@@ -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):