# XXX: REMOVE THIS ONCE UNUSED_0 IS YANKED FROM auxdbkeys
# ~harring
- filtered_auxdbkeys = filter(lambda x: not x.startswith("UNUSED_0"), auxdbkeys)
+ filtered_auxdbkeys = list(filter(lambda x: not x.startswith("UNUSED_0"), auxdbkeys))
filtered_auxdbkeys.sort()
from portage.cache import metadata_overlay, volatile
if not depcachedir_w_ok:
from portage import os
from portage import _encodings
+from portage import _unicode_decode
from portage import _unicode_encode
import portage
portage.proxy.lazyimport.lazyimport(globals(),
if pre_exec:
pre_exec()
+ # Decode all keys for compatibility with Python 3.
+ env_decoded = {}
+ for k, v in env.items():
+ env_decoded[_unicode_decode(k)] = v
+
# And switch to the new process.
- os.execve(binary, myargs, env)
+ os.execve(binary, myargs, env_decoded)
def find_binary(binary):
"""