Every time, I using e-file or euse, sometimes, when I use gentoolkit's equery, and sometimes, when I use binhosts i get error like this: Traceback (most recent call last): File "/usr/bin/emerge", line 42, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 1528, in emerge_main return action_info(settings, trees, myopts, valid_atoms) File "/usr/lib64/portage/pym/_emerge/actions.py", line 1295, in action_info print('%s="%s"' % (x, settings[x])) UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-10: ordinal not in range(128) I think, that it'll be better to fix portage to use unicode, except of ascii. By the way, it is NO any non-ascii characters in queries and in tose scripts. //with best regards, mva.
*** Bug 325511 has been marked as a duplicate of this bug. ***
After the investigation, the issue occurs in a very specific case, where: 1) one of environment variables contain unicode characters (in this case, GPG_TTY), 2) 'emerge --info' is being called with '--verbose' (or '--verbose' is specified in EMERGE_DEFAULT_OPTS), 3) stdout is not a tty/pty. In the particular case, 'emerge --info' seems to be called by equery, and the '--verbose' switch is being appended because of EMERGE_DEFAULT_OPTS. This makes it try to output all the environmental variables, and thus results in a failure when approaching unicode characters in one of them.
Yep, Michał is right. And, if you interested, in my case $GPG_TTY has "not a teletype" value in russian language ("не телетайп"). Of course, in unicode, due to I'm using ru_RU.UTF-8 locale. //with best regards, mva
Created attachment 236515 [details, diff] action_info.patch Please test this patch.
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=89f602d504cb8c2d51e13c8503f098749a09e001
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.