From 91686dda250ffa32a088ece64f9c8b640f683fa3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 24 Apr 2006 23:20:53 +0000 Subject: Add a note concerning the separation of legacy global initializations. svn path=/main/trunk/; revision=3218 --- pym/portage.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pym') 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): -- cgit v1.2.3-1-g7c22