public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/elfix:elfix-0.2.x commit in: scripts/
Date: Mon, 17 Oct 2011 21:09:40 +0000 (UTC)	[thread overview]
Message-ID: <fa17b2980b8c20d095c357f122315d6df24c764d.blueness@gentoo> (raw)

commit:     fa17b2980b8c20d095c357f122315d6df24c764d
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: Mon Oct 17 21:03:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=fa17b298

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 ) = get_forward_linkings()
 	print_forward_linkings( forward_linkings, so2library_mappings, verbose)
+	print
 
 
 def run_reverse(verbose):
 	( forward_linkings, so2library_mappings ) = get_forward_linkings()
 	reverse_linkings = invert_linkings( forward_linkings )
 	print_reverse_linkings( reverse_linkings, so2library_mappings, verbose )
+	print
 
 
 def run_binary(binary, verbose):
@@ -253,9 +255,23 @@ def run_binary(binary, verbose):
 		print
 
 
-def run_soname(soname, verbose):
+def invert_so2library_mappings( so2library_mappings ):
+	library2soname_mappings = {}
+	for soname, library in so2library_mappings.iteritems():
+		library2soname_mappings[library] = soname
+	return library2soname_mappings
+
+
+def run_soname(name, verbose, use_soname):
 	( forward_linkings, so2library_mappings ) = get_forward_linkings()
 	reverse_linkings = invert_linkings( forward_linkings )
+
+	if use_soname:
+		soname = name
+	else:
+		library2soname_mappings = invert_so2library_mappings(so2library_mappings)
+		soname = library2soname_mappings[name]
+
 	linkings = reverse_linkings[soname]
 	library = so2library_mappings[soname]
 
@@ -284,9 +300,10 @@ def run_soname(soname, verbose):
 		print '\tMismatches'
 		print
 
+
 def main():
 	try:
-		opts, args = getopt.getopt(sys.argv[1:], 'hfrb:s:v')
+		opts, args = 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():
 
 	binary = None
 	soname = None
+	library = None
 
 	verbose = False
 
@@ -316,6 +334,8 @@ def main():
 			binary = a
 		elif o == '-s':
 			soname = a
+		elif o == '-l':
+			library = a
 		elif o == '-v':
 			verbose = True
 		else:
@@ -337,8 +357,12 @@ def main():
 	if binary != None:
 		run_binary(binary, verbose)
 
-	if soname !=None:
-		run_soname(soname, verbose)
+	if soname != None:
+		run_soname(soname, verbose, True)
+
+	if library != None:
+		library = os.path.realpath(library)
+		run_soname(library, verbose, False)
 
 if __name__ == '__main__':
     main()



             reply	other threads:[~2011-10-17 21:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 21:09 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-17 21:09 [gentoo-commits] proj/elfix:elfix-0.2.x commit in: scripts/ Anthony G. Basile
2011-10-17 21:09 Anthony G. Basile
2011-10-17 21:09 Anthony G. Basile
2011-10-17 21:09 Anthony G. Basile
2011-10-17 21:09 Anthony G. Basile
2011-10-17 21:09 Anthony G. Basile
2011-10-17 21:09 Anthony G. Basile
2011-10-12 10:49 Anthony G. Basile
2011-10-12 10:48 Anthony G. Basile
2011-10-12 10:48 Anthony G. Basile
2011-10-12 10:47 Anthony G. Basile
2011-10-12 10:47 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile
2011-10-08 18:54 Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa17b2980b8c20d095c357f122315d6df24c764d.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox