From 7961f9dbe1db15bb91941f1789d191d0b7289eb1 Mon Sep 17 00:00:00 2001 From: Darin Petkov Date: Wed, 25 May 2011 14:09:16 -0700 Subject: [PATCH] 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 Reviewed-by: David McMahon Tested-by: David McMahon Tested-by: David McMahon Reviewed-by: David McMahon --- generate_au_zip.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/generate_au_zip.py b/generate_au_zip.py index a33c5f7f22..f1378edabc 100755 --- a/generate_au_zip.py +++ b/generate_au_zip.py @@ -1,6 +1,6 @@ #!/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 # 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 black_list: List of files that we should ignore Returns: - library_list: List of files that are dependencies + List of files that are dependencies """ + libs = set() for file_name in ldd_files: logging.debug('Running ldd on %s', file_name) cmd = ['/usr/bin/ldd', file_name] @@ -81,16 +82,14 @@ def DepsToCopy(ldd_files, black_list): logging.error('ouput %s', e.output) raise - library_list = [] - if not stdout_data: - return library_list + if not stdout_data: continue logging.debug('ldd for %s = stdout = %s stderr =%s', file_name, 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): @@ -247,7 +246,7 @@ def main(): (options, args) = parser.parse_args() if options.debug: - logging.setLevel(logging.DEBUG) + logging.getLogger().setLevel(logging.DEBUG) logging.debug('Options are %s ', options)