diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-12-26 17:23:57 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-12-26 17:23:57 -0500 |
commit | dc3ff5d76ec1dafbbd1b5068d888c6c042310366 (patch) | |
tree | e9cfd3204a163d417b51d5c79030f9d2f32460fa | |
parent | scripts/revdep-pax: die elegantly if binary/library/soname is not found (diff) | |
download | elfix-dc3ff5d76ec1dafbbd1b5068d888c6c042310366.tar.gz elfix-dc3ff5d76ec1dafbbd1b5068d888c6c042310366.tar.bz2 elfix-dc3ff5d76ec1dafbbd1b5068d888c6c042310366.zip |
scripts/revdep-pax: wrap pax.setflags() to allow complex logic
-rwxr-xr-x | scripts/revdep-pax | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/revdep-pax b/scripts/revdep-pax index 3d8e213..a4e9396 100755 --- a/scripts/revdep-pax +++ b/scripts/revdep-pax @@ -187,6 +187,22 @@ def run_reverse(verbose, executable_only): print_reverse_linkings( reverse_linkings, so2library_mappings, verbose, executable_only) +def migrate_flags(elf, pax_flags) + """ + Importer Exporter Result + Force On Force On Force On + Force On Force Off Warn Only + Force On Nothing Force On + Force Off Force On Warn Only + Force Off Force Off Force Off + Force Off Nothing Force Off + Nothing Force On Force On + Nothing Force Off Force Off + Nothing Nothing Nothing + """ + pax.setflags(elf, pax_flags) + + def run_binary(binary, verbose, mark): ( linkings, mappings ) = get_ldd_linkings(binary) ( binary_flags, binary_pax_flags ) = pax.getflags(binary) @@ -230,7 +246,7 @@ def run_binary(binary, verbose, mark): if do_marking: try: - pax.setflags(library, binary_pax_flags) + migrate_flags(library, binary_pax_flags) except: print "\n\tCould not set pax flags on %s, file is probably busy" % library print "\tShut down all processes that use it and try again" @@ -310,7 +326,7 @@ def run_soname(name, verbose, use_soname, mark, executable_only): print '\t\tPlease enter y or n' if do_marking: try: - pax.setflags(binary, library_pax_flags) + migrate_flags(binary, library_pax_flags) except: print "\n\tCould not set pax flags on %s, file is probably busy" % binary print "\tShut down all processes that use it and try again" |