Run DepsToCopy on all ldd_files, not just the first one.

This avoid skipping the dependencies of bsdiff, bspatch and cgpt.

BUG=chromium-os:15766
TEST=ran generate_au_zip, ensured bsdiff dependencies are included in the .zip

Change-Id: I7dfe5d1a3197df0f6036e33a20989813a22b16cc
Reviewed-on: http://gerrit.chromium.org/gerrit/1564
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: David McMahon <djmm@google.com>
Tested-by: David McMahon <djmm@google.com>
Tested-by: David McMahon <djmm@chromium.org>
Reviewed-by: David McMahon <djmm@chromium.org>
This commit is contained in:
Darin Petkov 2011-05-25 14:09:16 -07:00
parent f9fa9f532a
commit 7961f9dbe1

View File

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
@ -63,8 +63,9 @@ def DepsToCopy(ldd_files, black_list):
ldd_files: List of dynamic files that needs to have the deps evaluated ldd_files: List of dynamic files that needs to have the deps evaluated
black_list: List of files that we should ignore black_list: List of files that we should ignore
Returns: Returns:
library_list: List of files that are dependencies List of files that are dependencies
""" """
libs = set()
for file_name in ldd_files: for file_name in ldd_files:
logging.debug('Running ldd on %s', file_name) logging.debug('Running ldd on %s', file_name)
cmd = ['/usr/bin/ldd', file_name] cmd = ['/usr/bin/ldd', file_name]
@ -81,16 +82,14 @@ def DepsToCopy(ldd_files, black_list):
logging.error('ouput %s', e.output) logging.error('ouput %s', e.output)
raise raise
library_list = [] if not stdout_data: continue
if not stdout_data:
return library_list
logging.debug('ldd for %s = stdout = %s stderr =%s', file_name, logging.debug('ldd for %s = stdout = %s stderr =%s', file_name,
stdout_data, stderr_data) stdout_data, stderr_data)
library_list = _SplitAndStrip(stdout_data) libs |= set(_SplitAndStrip(stdout_data))
return _ExcludeBlacklist(library_list, black_list) return _ExcludeBlacklist(list(libs), black_list)
def CopyRequiredFiles(dest_files_root): def CopyRequiredFiles(dest_files_root):
@ -247,7 +246,7 @@ def main():
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
if options.debug: if options.debug:
logging.setLevel(logging.DEBUG) logging.getLogger().setLevel(logging.DEBUG)
logging.debug('Options are %s ', options) logging.debug('Options are %s ', options)