Apply Justin Riley's ACCEPT_KEYWORDS patch.
authorJustin Riley (home key) <justin.t.riley@gmail.com>
Sun, 5 Jun 2011 22:37:56 +0000 (18:37 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 5 Jun 2011 22:37:56 +0000 (18:37 -0400)
Excerpts from Justin's comments [1]:

At least for Portage 2.1.4.4, /usr/lib64/portage/pym/portage.py's
config class specifically excludes ACCEPT_KEYWORDS. Therefore,
  ENV = portage_config(clone=portage_settings).environ()
will never contain ACCEPT_KEYWORDS argument and the arch will always
be ~x86 as the result of get_keyword().

...

After looking at the code, it appears that the PORTAGE_CONFIG variable
introduced in the previous patch can completely replace ENV.  Here's
the patch that simply changes:

  ENV = portage_config(clone=portage_settings).environ()

to

  ENV = portage_config(clone=portage_settings)

[1]: http://code.google.com/p/g-pypi/issues/detail?id=4

g_pypi/portage_utils.py

index 94b09b7e312834069458b2815f054e8cf7aea446..7bca6d3d1eed6378a13971c75ad5a910174d620f 100644 (file)
@@ -33,7 +33,7 @@ import gentoolkit.query
 
 __docformat__ = 'restructuredtext'
 
-ENV = portage_config(clone=portage_settings).environ()
+ENV = portage_config(clone=portage_settings)
 LOGGER = logging.getLogger(__name__)
 LOGGER.setLevel(logging.DEBUG)
 LOGGER.addHandler(logging.StreamHandler())