When calling 'ebuild' from within a directory containing unicode characters in path, Python reports the following warning:
/usr/bin/ebuild:119: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if "PWD" in os.environ and os.environ["PWD"] != mycwd and \
I guess the reason for this is that the getcwd() function (result of which is stored in mycmd) is being wrapped by portage, and environ is not. Using getcwd() from the real os module removes the warning as the attached patch proves. But I guess it's not the way we're going to fix it.
Created attachment 228113 [details, diff]
The proof-of-concept patch
Created attachment 228145 [details, diff]
Encode mycwd back to byte format
This patch performs the reverse of what portage's unicode module wrapper does, thus making the 'mycwd' suitable for comparison with os.environ['PWD'].
Created attachment 228147 [details, diff]
Alternative approach patch (converting PWD to unicode format)
And here's a patch offering the reverse approach to the issue. It converts the string obtained from os.environ['PWD'] to unicode like os.environ was unicode-wrapped too. This way we avoid converting mycwd forth and back.
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.