From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-dev+bounces-59577-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3EA681381F3 for <garchives@archives.gentoo.org>; Tue, 9 Apr 2013 19:30:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F22CE0A49; Tue, 9 Apr 2013 19:29:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9F846E09F6 for <gentoo-dev@lists.gentoo.org>; Tue, 9 Apr 2013 19:29:58 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 669D033DC04 for <gentoo-dev@lists.gentoo.org>; Tue, 9 Apr 2013 19:29:57 +0000 (UTC) From: Mike Frysinger <vapier@gentoo.org> Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [fyi] lddtree magic Date: Tue, 9 Apr 2013 15:31:05 -0400 User-Agent: KMail/1.13.7 (Linux/3.8.3; KDE/4.6.5; x86_64; ; ) Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2479982.puLtycMTvz"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201304091531.06078.vapier@gentoo.org> X-Archives-Salt: b45b2cec-fb83-4e96-8ad4-0260f5a07a1c X-Archives-Hash: 6b9437c67ed510be0b1f150241dc5501 --nextPart2479982.puLtycMTvz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable i doubt few people have noticed, but i've rewritten lddtree recently in=20 python. i did for speed, for fun, and to add a lot more functionality that= =20 would have driven the bash code base to new perverse levels. i've randomly stumbled across places in our code base (beyond ebuilds) wher= e=20 the new python version would be useful. rather than try and ferret out tho= se=20 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 sm= all=20 edge case that isn't quite handled, let me know. i can always add another= =20 option :). specifically, lddtree (both the shell & python variants) support a --list: $ lddtree -l /bin/bash /bin/bash /lib64/ld-linux-x86-64.so.2 /lib64/libreadline.so.6 /lib64/libhistory.so.6 /lib64/libncurses.so.5 /lib64/libdl.so.2 /lib64/libc.so.6 this way you don't have to resort to grep/awk/sed on the output to try and = get=20 the names out of `lddtree` (or heaven forbid, `ldd`). it also supports --root just like you'd expect: $ lddtree -l /bin/bash --root /mnt/space/distros/x86 /mnt/space/distros/x86/bin/bash /mnt/space/distros/x86/lib/ld-linux.so.2 /mnt/space/distros/x86/lib/libreadline.so.6 /mnt/space/distros/x86/lib/libncurses.so.5 /mnt/space/distros/x86/lib/libdl.so.2 /mnt/space/distros/x86/lib/libc.so.6 but things get even crazier with the new --copy-to-tree option (python vers= ion=20 only). this is useful for scenarios like kernel initramfs where you want t= o=20 copy over one or two ELFs and their dependencies w/out resorting to statica= lly=20 linking them. check out the --help text for more details. =2Dmike --nextPart2479982.puLtycMTvz Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJRZGx6AAoJEEFjO5/oN/WBobUP/i8eBNpTQKts8+TVXw2e7F7d KQ9gubJuxcQzlw/j9lbUoU69tzuUUg4a+p2OGH7blxggg8DCfV87dmsOcQmw+m4l aJjyIcMELKHW6qNjgqsOW2dizi7wON8Hq2HvEDGuqaEj+TQlwWwhO9eH6UHRcGDn bzFD6wAQ5/AkoMhSpqbt/vjw5azvJZrx5iwvX6PHhRhxi3s233uKAwtx/MHjigog tLrnh89ibggDEErnPB7a9Zk2hPS6mXOGK0CyouJcLFzntvguXZccrxE0cKLTrqCC HVtFti61luy8jU3ulzS97Okbu6RgNKMq+OXxRP3qj5JfwCtwgAvIBHynMz0fGXvu soEPpdy5rBato5lll1+5bC2MO6VwM0snzW0cd2ZPFXAlc9tiyzOSaqrmbkoY4J79 KpcYy2NQzU45RRMOPZ4xPJnxgXEfp27HBmRXFz6EnrOA4fNN03suTyHdkU+Btgyx kcnEtUVp+FIP0SLRb73z6sO4dkk6B9C4HA/QRonTrq27C2Iwq6Zj3JBgSwIYhOb+ YG4luB+P61mQOZZTVrEp6bQlBHforo1ShCc0/ksGF2jQ04Rt0c1Oq3slT/k4vMwC d9rWSv1E78JWPl4FIY774Lpyn+DlqERnLwtCUrHYTYWNzDpoZaeYouqOdelYp/+F WZaP+pVFuf05kf+U+3AX =G5OP -----END PGP SIGNATURE----- --nextPart2479982.puLtycMTvz--