From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-commits+bounces-391666-garchives=archives.gentoo.org@lists.gentoo.org>) id 1RED1s-0002ja-4O for garchives@archives.gentoo.org; Thu, 13 Oct 2011 04:36:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6709121C03C; Thu, 13 Oct 2011 04:36:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2143B21C03C for <gentoo-commits@lists.gentoo.org>; Thu, 13 Oct 2011 04:36:16 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA9011B4018 for <gentoo-commits@lists.gentoo.org>; Thu, 13 Oct 2011 04:36:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D194780042 for <gentoo-commits@lists.gentoo.org>; Thu, 13 Oct 2011 04:36:14 +0000 (UTC) From: "Anthony G. Basile" <blueness@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" <blueness@gentoo.org> Message-ID: <0308fc3a8336b7f1374ef8bd4d24e37cd663d18c.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: scripts/ X-VCS-Repository: proj/elfix X-VCS-Files: scripts/revdep-pax X-VCS-Directories: scripts/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 0308fc3a8336b7f1374ef8bd4d24e37cd663d18c Date: Thu, 13 Oct 2011 04:36:14 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: a0a7d248e1b46ba3d1c5c7847bd97bef commit: 0308fc3a8336b7f1374ef8bd4d24e37cd663d18c Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> AuthorDate: Thu Oct 13 04:36:09 2011 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Thu Oct 13 04:36:09 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/elfix.git;a=3D= commit;h=3D0308fc3a scripts/revdep-pax: add search by full library path --- scripts/revdep-pax | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/scripts/revdep-pax b/scripts/revdep-pax index dd359db..0fcb8e6 100755 --- a/scripts/revdep-pax +++ b/scripts/revdep-pax @@ -215,12 +215,14 @@ def run_usage(): def run_forward(verbose): ( forward_linkings, so2library_mappings ) =3D get_forward_linkings() print_forward_linkings( forward_linkings, so2library_mappings, verbose) + print =20 =20 def run_reverse(verbose): ( forward_linkings, so2library_mappings ) =3D get_forward_linkings() reverse_linkings =3D invert_linkings( forward_linkings ) print_reverse_linkings( reverse_linkings, so2library_mappings, verbose = ) + print =20 =20 def run_binary(binary, verbose): @@ -253,9 +255,23 @@ def run_binary(binary, verbose): print =20 =20 -def run_soname(soname, verbose): +def invert_so2library_mappings( so2library_mappings ): + library2soname_mappings =3D {} + for soname, library in so2library_mappings.iteritems(): + library2soname_mappings[library] =3D soname + return library2soname_mappings + + +def run_soname(name, verbose, use_soname): ( forward_linkings, so2library_mappings ) =3D get_forward_linkings() reverse_linkings =3D invert_linkings( forward_linkings ) + + if use_soname: + soname =3D name + else: + library2soname_mappings =3D invert_so2library_mappings(so2library_mapp= ings) + soname =3D library2soname_mappings[name] + linkings =3D reverse_linkings[soname] library =3D so2library_mappings[soname] =20 @@ -284,9 +300,10 @@ def run_soname(soname, verbose): print '\tMismatches' print =20 + def main(): try: - opts, args =3D getopt.getopt(sys.argv[1:], 'hfrb:s:v') + opts, args =3D getopt.getopt(sys.argv[1:], 'hfrb:s:l:v') except getopt.GetoptError, err: print str(err) # will print something like 'option -a not recognized' run_usage() @@ -302,6 +319,7 @@ def main(): =20 binary =3D None soname =3D None + library =3D None =20 verbose =3D False =20 @@ -316,6 +334,8 @@ def main(): binary =3D a elif o =3D=3D '-s': soname =3D a + elif o =3D=3D '-l': + library =3D a elif o =3D=3D '-v': verbose =3D True else: @@ -337,8 +357,12 @@ def main(): if binary !=3D None: run_binary(binary, verbose) =20 - if soname !=3DNone: - run_soname(soname, verbose) + if soname !=3D None: + run_soname(soname, verbose, True) + + if library !=3D None: + library =3D os.path.realpath(library) + run_soname(library, verbose, False) =20 if __name__ =3D=3D '__main__': main()