revdep-pax tries to interpret non ascii data during execution returned by ldd when a non ascii locale is set. This can be fixed by setting a propper environment before calling ldd (i.e. LC_ALL=C ) to ensure all the messages will be written with the C locale (which seems to be ascii). Reproducible: Always Steps to Reproduce: 1. Set LANG to an utf-8 locale (for example LANG=es_ES.UTF-8) 2. Run revdep-pax Actual Results: Traceback (most recent call last): File "/usr/sbin/revdep-pax", line 489, in <module> main() File "/usr/sbin/revdep-pax", line 483, in main run_soname(soname, verbose, True, mark, allyes, executable_only) File "/usr/sbin/revdep-pax", line 313, in run_soname ( forward_linkings, so2library_mappings ) = get_forward_linkings() File "/usr/sbin/revdep-pax", line 60, in get_forward_linkings ( linkings, mappings ) = get_ldd_linkings(binary) File "/usr/sbin/revdep-pax", line 21, in get_ldd_linkings ldd_lines = ldd_output.stdout.read().decode().split('\n') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128) Expected Results: Normal execution of the program.
Created attachment 325452 [details] fix unicode decode for any file system encoding Can you test this patch for the following combo: 1) UTF-8 and non-UTF-8 2) python 3.2 or 3.1 and python 2.7
The new revdep-pax does not use ldd. Rather it obtains the NEEDED values from portage and then contructs the entire linkage map.