* Re: [gentoo-dev] [fyi] lddtree magic
@ 2013-04-09 20:41 99% ` Samuli Suominen
0 siblings, 0 replies; 1+ results
From: Samuli Suominen @ 2013-04-09 20:41 UTC (permalink / raw
To: gentoo-dev
On 09/04/13 22:31, Mike Frysinger wrote:
> i doubt few people have noticed, but i've rewritten lddtree recently in
> python. i did for speed, for fun, and to add a lot more functionality that
> would have driven the bash code base to new perverse levels.
>
> i've randomly stumbled across places in our code base (beyond ebuilds) where
> the new python version would be useful. rather than try and ferret out those
> myself, i'll just announce here and people can sort it out.
>
> if you guys think this can satisfy most of your needs but there's like a small
> edge case that isn't quite handled, let me know. i can always add another
> option :).
>
> specifically, lddtree (both the shell & python variants) support a --list:
> $ lddtree -l /bin/bash
$ qfile -v /usr/bin/lddtree
app-misc/pax-utils-0.6 (/usr/bin/lddtree)
$ python --version
Python 3.2.3
$ lddtree -l /bin/bash
Traceback (most recent call last):
File "/usr/bin/lddtree", line 450, in <module>
sys.exit(main(sys.argv))
File "/usr/bin/lddtree", line 437, in main
elf = ParseELF(path, options.root, ldpaths)
File "/usr/bin/lddtree", line 235, in ParseELF
elf = ELFFile(f)
File "/usr/lib64/python3.2/site-packages/elftools/elf/elffile.py",
line 47, in __init__
self._identify_file()
File "/usr/lib64/python3.2/site-packages/elftools/elf/elffile.py",
line 177, in _identify_file
magic = self.stream.read(4)
File "/usr/lib64/python3.2/codecs.py", line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 25:
invalid start byte
$ locale
LANG=en_US.UTF-8
LC_CTYPE=fi_FI.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
- Samuli
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2013-04-09 19:31 [gentoo-dev] [fyi] lddtree magic Mike Frysinger
2013-04-09 20:41 99% ` Samuli Suominen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox