Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310789 - Failures running repoman in a non-ascii directory
Summary: Failures running repoman in a non-ascii directory
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 431026
  Show dependency tree
 
Reported: 2010-03-22 19:48 UTC by Serkan Kaba (RETIRED)
Modified: 2012-09-12 08:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info.txt,2.13 KB, text/plain)
2010-03-22 19:53 UTC, Serkan Kaba (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serkan Kaba (RETIRED) gentoo-dev 2010-03-22 19:48:26 UTC
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
Comment 1 Serkan Kaba (RETIRED) gentoo-dev 2010-03-22 19:53:21 UTC
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=' ')
Comment 2 Rafał Mużyło 2010-03-25 16:36:27 UTC
As sometimes filesystem encoding doesn't match locale,
did you check what values python prints for the first failing check ?

Best check all three.
Comment 3 Zac Medico gentoo-dev 2012-09-09 21:46:35 UTC
(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.
Comment 8 Zac Medico gentoo-dev 2012-09-12 08:02:05 UTC
This is fixed in 2.1.11.15 and 2.2.0_alpha126.