Summary: | Failures running repoman in a non-ascii directory | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Serkan Kaba (RETIRED) <serkan> |
Component: | Repoman | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | 2.2 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 431026 | ||
Attachments: | emerge --info |
Created attachment 224767 [details]
emerge --info
It's interesting that if I want to redirect emerge --info output to some file I get the following error (discovered when creatinhg this attachment)
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 1366, in emerge_main
return action_info(settings, trees, myopts, valid_atoms)
File "/usr/lib64/portage/pym/_emerge/actions.py", line 1123, in action_info
print('USE="%s"' % " ".join(use), end=' ')
As sometimes filesystem encoding doesn't match locale, did you check what values python prints for the first failing check ? Best check all three. (In reply to comment #1) > File "/usr/lib64/portage/pym/_emerge/actions.py", line 1123, in action_info > print('USE="%s"' % " ".join(use), end=' ') This should be fixed by replacement of print() with writemsg_stdout() in this commit: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=aca13b87622bde4f19ab7f42411aab3fc1303ccf I'll convert all of the popen() calls to use the subprocess.Popen() in a unicode-safe manner. Fix the popen calls: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=45bc97f98b41fe4e2286dfb50d1c9f263b0da8a4 Fix the getstatusoutput calls: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bfe6ea5116870f278b701601f4f6ffc677bff293 http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4ad3eda1e7f9546ebc474ae563207fb5a2566839 I'll have to do some testing to see if there's anything else... After applying these patches I'm able to commit in a git repo with LANG=C and unicode paths: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f01d7a8ca158ec60df76a3e8ae5b80ac3f62429e http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=11d08aca93d6a458cdf71473c22c205d66df57f6 Fix Unicode unequal comparison warning: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c512c31e3ce0f53ac3ad4d59a577503413704174 Fix make_herd_base: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5614fa2d7cef0b509136fd00c52a8436d41a3647 This is fixed in 2.1.11.15 and 2.2.0_alpha126. |
repoman manifest and repoman full fails and/or warns when run in a non-ascii path firari@firari /diger/çalışma/gentoo-x86/app-mobilephone/anyremote $ repoman full /usr/lib64/portage/pym/repoman/utilities.py:358: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if pwd and pwd != location and os.path.realpath(pwd) == location: RepoMan scours the neighborhood... Traceback (most recent call last): File "/usr/bin/repoman", line 1299, in <module> (metadata_dtd, os.path.join(checkdir, "metadata.xml"))) File "/usr/lib64/python2.6/commands.py", line 55, in getstatusoutput pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 83: ordinal not in range(128) firari@firari /diger/çalışma/gentoo-x86/app-mobilephone/anyremote $ repoman manifest /usr/lib64/portage/pym/repoman/utilities.py:358: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if pwd and pwd != location and os.path.realpath(pwd) == location: >>> Creating Manifest for /diger/çalışma/gentoo-x86/app-mobilephone/anyremote I'll attach emerge --info as well