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__ putenv(key, item) 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: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=aab8d3dca843e07866755fc821b9bc9d5004bde5
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.