| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """ | 7 """ |
| 8 Script to generate a zip file of delta-generator and it's dependencies. | 8 Script to generate a zip file of delta-generator and it's dependencies. |
| 9 """ | 9 """ |
| 10 import logging.handlers | 10 import logging.handlers |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 dest_files_root: location of the directory where we should copy the files | 99 dest_files_root: location of the directory where we should copy the files |
| 100 """ | 100 """ |
| 101 if not dest_files_root: | 101 if not dest_files_root: |
| 102 logging.error('Invalid option passed for dest_files_root') | 102 logging.error('Invalid option passed for dest_files_root') |
| 103 sys.exit(1) | 103 sys.exit(1) |
| 104 # Files that need to go through ldd | 104 # Files that need to go through ldd |
| 105 ldd_files = ['/usr/bin/delta_generator', '/usr/bin/bsdiff', | 105 ldd_files = ['/usr/bin/delta_generator', '/usr/bin/bsdiff', |
| 106 '/usr/bin/bspatch', '/usr/bin/cgpt'] | 106 '/usr/bin/bspatch', '/usr/bin/cgpt'] |
| 107 # statically linked files and scripts etc., | 107 # statically linked files and scripts etc., |
| 108 static_files = ['~/trunk/src/scripts/common.sh', | 108 static_files = ['~/trunk/src/scripts/common.sh', |
| 109 '~/trunk/src/scripts/cros_generate_update_payload', | 109 '/usr/bin/cros_generate_update_payload', |
| 110 '~/trunk/src/scripts/chromeos-common.sh'] | 110 '~/trunk/src/scripts/chromeos-common.sh'] |
| 111 # We need directories to be copied recursively to a destination within tempdir | 111 # We need directories to be copied recursively to a destination within tempdir |
| 112 recurse_dirs = {'~/trunk/src/scripts/lib/shflags': 'lib/shflags'} | 112 recurse_dirs = {'~/trunk/src/scripts/lib/shflags': 'lib/shflags'} |
| 113 | 113 |
| 114 black_list = [ | 114 black_list = [ |
| 115 'linux-vdso.so', | 115 'linux-vdso.so', |
| 116 'libgcc_s.so', | 116 'libgcc_s.so', |
| 117 'libgthread-2.0.so', | 117 'libgthread-2.0.so', |
| 118 'libpthread.so', | 118 'libpthread.so', |
| 119 'librt.so', | 119 'librt.so', |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 zip_file_name = os.path.join(temp_dir, options.zip_name) | 255 zip_file_name = os.path.join(temp_dir, options.zip_name) |
| 256 GenerateZipFile(zip_file_name, dest_files_root) | 256 GenerateZipFile(zip_file_name, dest_files_root) |
| 257 CopyZipToFinalDestination(options.output_dir, zip_file_name) | 257 CopyZipToFinalDestination(options.output_dir, zip_file_name) |
| 258 logging.info('Generated %s/%s' % (options.output_dir, options.zip_name)) | 258 logging.info('Generated %s/%s' % (options.output_dir, options.zip_name)) |
| 259 | 259 |
| 260 if not options.keep_temp: | 260 if not options.keep_temp: |
| 261 CleanUp(temp_dir) | 261 CleanUp(temp_dir) |
| 262 | 262 |
| 263 if __name__ == '__main__': | 263 if __name__ == '__main__': |
| 264 main() | 264 main() |
| OLD | NEW |