1 |
commit: 6ec2ef8bcc3eedc70d0186f76588842c85c79408 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 26 22:23:57 2011 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 29 00:57:57 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=6ec2ef8b |
7 |
|
8 |
scripts/revdep-pax: wrap pax.setflags() to allow complex logic |
9 |
|
10 |
--- |
11 |
scripts/revdep-pax | 20 ++++++++++++++++++-- |
12 |
1 files changed, 18 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/scripts/revdep-pax b/scripts/revdep-pax |
15 |
index 3d8e213..a4e9396 100755 |
16 |
--- a/scripts/revdep-pax |
17 |
+++ b/scripts/revdep-pax |
18 |
@@ -187,6 +187,22 @@ def run_reverse(verbose, executable_only): |
19 |
print_reverse_linkings( reverse_linkings, so2library_mappings, verbose, executable_only) |
20 |
|
21 |
|
22 |
+def migrate_flags(elf, pax_flags) |
23 |
+ """ |
24 |
+ Importer Exporter Result |
25 |
+ Force On Force On Force On |
26 |
+ Force On Force Off Warn Only |
27 |
+ Force On Nothing Force On |
28 |
+ Force Off Force On Warn Only |
29 |
+ Force Off Force Off Force Off |
30 |
+ Force Off Nothing Force Off |
31 |
+ Nothing Force On Force On |
32 |
+ Nothing Force Off Force Off |
33 |
+ Nothing Nothing Nothing |
34 |
+ """ |
35 |
+ pax.setflags(elf, pax_flags) |
36 |
+ |
37 |
+ |
38 |
def run_binary(binary, verbose, mark): |
39 |
( linkings, mappings ) = get_ldd_linkings(binary) |
40 |
( binary_flags, binary_pax_flags ) = pax.getflags(binary) |
41 |
@@ -230,7 +246,7 @@ def run_binary(binary, verbose, mark): |
42 |
|
43 |
if do_marking: |
44 |
try: |
45 |
- pax.setflags(library, binary_pax_flags) |
46 |
+ migrate_flags(library, binary_pax_flags) |
47 |
except: |
48 |
print "\n\tCould not set pax flags on %s, file is probably busy" % library |
49 |
print "\tShut down all processes that use it and try again" |
50 |
@@ -310,7 +326,7 @@ def run_soname(name, verbose, use_soname, mark, executable_only): |
51 |
print '\t\tPlease enter y or n' |
52 |
if do_marking: |
53 |
try: |
54 |
- pax.setflags(binary, library_pax_flags) |
55 |
+ migrate_flags(binary, library_pax_flags) |
56 |
except: |
57 |
print "\n\tCould not set pax flags on %s, file is probably busy" % binary |
58 |
print "\tShut down all processes that use it and try again" |