Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [fyi] lddtree magic
Date: Tue, 09 Apr 2013 19:30:04
1 i doubt few people have noticed, but i've rewritten lddtree recently in
2 python. i did for speed, for fun, and to add a lot more functionality that
3 would have driven the bash code base to new perverse levels.
5 i've randomly stumbled across places in our code base (beyond ebuilds) where
6 the new python version would be useful. rather than try and ferret out those
7 myself, i'll just announce here and people can sort it out.
9 if you guys think this can satisfy most of your needs but there's like a small
10 edge case that isn't quite handled, let me know. i can always add another
11 option :).
13 specifically, lddtree (both the shell & python variants) support a --list:
14 $ lddtree -l /bin/bash
15 /bin/bash
16 /lib64/
17 /lib64/
18 /lib64/
19 /lib64/
20 /lib64/
21 /lib64/
22 this way you don't have to resort to grep/awk/sed on the output to try and get
23 the names out of `lddtree` (or heaven forbid, `ldd`).
25 it also supports --root just like you'd expect:
26 $ lddtree -l /bin/bash --root /mnt/space/distros/x86
27 /mnt/space/distros/x86/bin/bash
28 /mnt/space/distros/x86/lib/
29 /mnt/space/distros/x86/lib/
30 /mnt/space/distros/x86/lib/
31 /mnt/space/distros/x86/lib/
32 /mnt/space/distros/x86/lib/
34 but things get even crazier with the new --copy-to-tree option (python version
35 only). this is useful for scenarios like kernel initramfs where you want to
36 copy over one or two ELFs and their dependencies w/out resorting to statically
37 linking them. check out the --help text for more details.
38 -mike


File name MIME type
signature.asc application/pgp-signature


Subject Author
Re: [gentoo-dev] [fyi] lddtree magic "Diego Elio Pettenò" <flameeyes@×××××××××.eu>
Re: [gentoo-dev] [fyi] lddtree magic Samuli Suominen <ssuominen@g.o>
Re: [gentoo-dev] [fyi] lddtree magic Samuli Suominen <ssuominen@g.o>