aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlawek <lis.slawek@gmail.com>2011-04-27 06:21:03 +0200
committerSlawek <lis.slawek@gmail.com>2011-04-27 06:21:03 +0200
commitade3a26d6ac1003bd221cb3611567d175de5cf8b (patch)
treea773397ab24e7a8e5e248979885e0afa76fd3fd9
parentFixed .la files parser. Some minor logging fixes. (diff)
downloadgentoolkit-ade3a26d6ac1003bd221cb3611567d175de5cf8b.tar.gz
gentoolkit-ade3a26d6ac1003bd221cb3611567d175de5cf8b.tar.bz2
gentoolkit-ade3a26d6ac1003bd221cb3611567d175de5cf8b.zip
Added support for file path in -L option
-rw-r--r--pym/gentoolkit/revdep_rebuild/analyse.py16
-rw-r--r--pym/gentoolkit/revdep_rebuild/rebuild.py9
2 files changed, 19 insertions, 6 deletions
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
index be696d1..d94365e 100644
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@ -35,6 +35,7 @@ def prepare_checks(files_to_check, libraries, bits, cmd_max_args):
else:
libs.append(d)
dependencies.append([r[0],])
+
return (libs, dependencies)
@@ -176,6 +177,13 @@ def analyse(settings, logger, libraries=None, la_libraries=None,
found_libs = []
dependencies = []
+ if _libs_to_check:
+ nltc = []
+ for ltc in _libs_to_check:
+ if os.path.isfile(ltc):
+ ltc = scan(['-nBSF', '%S'], [ltc,], settings['CMD_MAX_ARGS'])[0].split()[0]
+ nltc += [ltc,]
+ _libs_to_check = nltc
_bits, linkg = platform.architecture()
if _bits.startswith('32'):
@@ -183,13 +191,15 @@ def analyse(settings, logger, libraries=None, la_libraries=None,
elif _bits.startswith('64'):
bits = 64
+ import time
+ broken = []
for av_bits in glob.glob('/lib[0-9]*') or ('/lib32',):
bits = int(av_bits[4:])
- _libraries = scan(['-M', str(bits), '-BF', '%F'], libraries+libraries_links, settings['CMD_MAX_ARGS'])
- #call_program(['scanelf', '-M', str(bits), '-BF', '%F',] + libraries+libraries_links).strip().split('\n')
+
+ #_libraries = scan(['-M', str(bits), '-BF', '%F'], libraries+libraries_links, settings['CMD_MAX_ARGS'])
+ _libraries = libraries+libraries_links
found_libs, dependencies = prepare_checks(libs_and_bins, _libraries, bits, settings['CMD_MAX_ARGS'])
- #print dependencies
broken = find_broken(found_libs, _libraries, _libs_to_check)
bits /= 2
diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py
index f77d98c..5385b0e 100644
--- a/pym/gentoolkit/revdep_rebuild/rebuild.py
+++ b/pym/gentoolkit/revdep_rebuild/rebuild.py
@@ -92,6 +92,9 @@ def init_logger(settings):
def parse_options():
"""Parses the command line options an sets settings accordingly"""
+ # @TODO: Verify: options: no-ld-path, no-order, no-progress are not appliable
+ # for revdep-ng
+
settings = DEFAULTS.copy()
try:
opts, args = getopt.getopt(sys.argv[1:],
@@ -155,11 +158,11 @@ def rebuild(logger, assigned, settings):
logger.warn(bold('\nThere is nothing to emerge. Exiting.'))
return 0
- emerge_command = args + ' --oneshot ' + emerge_command
+ emerge_command = emerge_command
- logger.warn(yellow('\nemerge') + bold(emerge_command))
+ logger.warn(yellow('\nemerge') + args + ' --oneshot ' + bold(emerge_command))
- success = os.system('emerge ' + emerge_command)
+ success = os.system('emerge ' + args + ' --oneshot ' + emerge_command)
return success