The ebuild script fails to append ebuild_portdir to the PORTDIR_OVERLAY envvar whenever the former contains unicode characters:
Traceback (most recent call last):
File "/home/mgorny/git/portage/bin/ebuild", line 134, in <module>
os.environ.get("PORTDIR_OVERLAY","") + " " + ebuild_portdir
File "/usr/lib64/python2.7/os.py", line 471, in __setitem__
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in position 14: ordinal not in range(128)
This is because it is trying to implicitly pass unicode string to os.environ. I'm attaching a patch using _unicode_encode() function to encode the argument before passing it to os.environ.
Created attachment 228149 [details, diff]
Patch fixing the issue with Py2
I would like to notice that although this patch fixes the issue for Python2, it causes Python3 to fail. I would like to notice too that even before the 'ebuild' script didn't work with Python3.
Thanks, this is fixed in git:
This is in 2.2_rc68, but I'll leave this bug open until it's in an unmasked version.
This is fixed in 2.1.9.