diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-24 23:20:53 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-24 23:20:53 +0000 |
commit | 91686dda250ffa32a088ece64f9c8b640f683fa3 (patch) | |
tree | 18c900cf75a586d74b00cda24c3ce4191a6b4b69 | |
parent | 41bd04fe4674e1a4b74077abe5cc7a5cfd9a3411 (diff) | |
download | portage-91686dda250ffa32a088ece64f9c8b640f683fa3.tar.gz portage-91686dda250ffa32a088ece64f9c8b640f683fa3.tar.bz2 portage-91686dda250ffa32a088ece64f9c8b640f683fa3.zip |
Add a note concerning the separation of legacy global initializations.
svn path=/main/trunk/; revision=3218
-rw-r--r-- | pym/portage.py | 8 |
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): |