diff options
author | 2012-12-22 11:36:30 -0500 | |
---|---|---|
committer | 2012-12-24 05:57:57 -0500 | |
commit | 1980444b6f28a408ae0cd11711633df5f47210a3 (patch) | |
tree | f77bbc80ab6eecc8b6b3e58636969e25cfc61d51 | |
parent | misc/alt-revdep-pax: remove soname list copy, add get_object_reverse_linkings() (diff) | |
download | elfix-1980444b6f28a408ae0cd11711633df5f47210a3.tar.gz elfix-1980444b6f28a408ae0cd11711633df5f47210a3.tar.bz2 elfix-1980444b6f28a408ae0cd11711633df5f47210a3.zip |
scripts/migrate-pax: rename functions in line with misc/alt-revdep-pax
-rwxr-xr-x | scripts/migrate-pax | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/migrate-pax b/scripts/migrate-pax index 994d4f7..5e46292 100755 --- a/scripts/migrate-pax +++ b/scripts/migrate-pax @@ -15,10 +15,11 @@ import getopt import sys import pax -def get_forward_linkings(): +def get_object_needed(): + var_db_pkg = '/var/db/pkg' - forward_linkings = {} + object_needed = {} for cat in os.listdir(var_db_pkg): catdir = '%s/%s' % (var_db_pkg, cat) for pkg in os.listdir(catdir): @@ -32,11 +33,11 @@ def get_forward_linkings(): link = re.split(';', line) elf = link[1] sonames = re.split(',', link[4]) - forward_linkings[elf] = sonames + object_needed[elf] = sonames except IOError: continue #File probably doesn't exist, which is okay - return forward_linkings + return object_needed def run_usage(): @@ -91,14 +92,13 @@ def main(): print('RUN AS ROOT: cannot migrate flags') sys.exit(0) - forward_linkings = get_forward_linkings() + object_needed = get_object_needed() fail = [] none = [] - for elf in forward_linkings: + for elf in object_needed: try: - flags = pax.getflags(elf)[0] if flags: if verbose: print("%s %s" % (flags, elf)) @@ -107,6 +107,7 @@ def main(): if verbose: print("NONE: %s" % elf) if do_migration: + flags = pax.getflags(elf)[0] flags = re.sub('-','',flags) pax.setstrflags(elf, flags) @@ -120,7 +121,7 @@ def main(): if uid == 0: fail.append(elf) if verbose: - print("BUSY: %s" % elf) + print("FAIL: %s" % elf) if verbose: if fail: |