| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import operator | 7 import operator |
| 8 import os | 8 import os |
| 9 import platform | 9 import platform |
| 10 import re | 10 import re |
| 11 import subprocess | 11 import subprocess |
| 12 import sys | 12 import sys |
| 13 | 13 |
| 14 | 14 |
| 15 SUPPORTED_UBUNTU_VERSIONS = ( | 15 SUPPORTED_UBUNTU_VERSIONS = ( |
| 16 {'number': '12.04', 'codename': 'precise'}, | |
| 17 {'number': '14.04', 'codename': 'trusty'}, | 16 {'number': '14.04', 'codename': 'trusty'}, |
| 18 {'number': '14.10', 'codename': 'utopic'}, | 17 {'number': '14.10', 'codename': 'utopic'}, |
| 19 {'number': '15.04', 'codename': 'vivid'}, | 18 {'number': '15.04', 'codename': 'vivid'}, |
| 20 {'number': '15.10', 'codename': 'wily'}, | 19 {'number': '15.10', 'codename': 'wily'}, |
| 21 ) | 20 ) |
| 22 | 21 |
| 23 | 22 |
| 24 # Packages needed for chromeos only. | 23 # Packages needed for chromeos only. |
| 25 _packages_chromeos_dev = ( | 24 _packages_chromeos_dev = ( |
| 26 'libbluetooth-dev', | 25 'libbluetooth-dev', |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 # but g++-X.Y-multilib gives us the 32-bit support that we need. Find out | 292 # but g++-X.Y-multilib gives us the 32-bit support that we need. Find out |
| 294 # the appropriate value of X and Y by seeing what version the current | 293 # the appropriate value of X and Y by seeing what version the current |
| 295 # distribution's g++-multilib package depends on. | 294 # distribution's g++-multilib package depends on. |
| 296 output = subprocess.check_output(['apt-cache', 'depends', 'g++-multilib']) | 295 output = subprocess.check_output(['apt-cache', 'depends', 'g++-multilib']) |
| 297 multilib_package = re.search(r'g\+\+-[0-9.]+-multilib', output).group() | 296 multilib_package = re.search(r'g\+\+-[0-9.]+-multilib', output).group() |
| 298 _packages_lib32 += (multilib_package,) | 297 _packages_lib32 += (multilib_package,) |
| 299 | 298 |
| 300 lsb_codename = lsb_release_short_codename() | 299 lsb_codename = lsb_release_short_codename() |
| 301 | 300 |
| 302 # Find the proper version of libstdc++6-4.x-dbg. | 301 # Find the proper version of libstdc++6-4.x-dbg. |
| 303 if lsb_codename == 'precise': | 302 if lsb_codename == 'trusty': |
| 304 _packages_dbg += ('libstdc++6-4.6-dbg',) | |
| 305 elif lsb_codename == 'trusty': | |
| 306 _packages_dbg += ('libstdc++6-4.8-dbg',) | 303 _packages_dbg += ('libstdc++6-4.8-dbg',) |
| 307 else: | 304 else: |
| 308 _packages_dbg += ('libstdc++6-4.9-dbg',) | 305 _packages_dbg += ('libstdc++6-4.9-dbg',) |
| 309 | 306 |
| 310 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 . | 307 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 . |
| 311 if lsb_codename == 'trusty': | 308 if lsb_codename == 'trusty': |
| 312 _packages_arm += ( | 309 _packages_arm += ( |
| 313 'g++-4.8-multilib-arm-linux-gnueabihf', | 310 'g++-4.8-multilib-arm-linux-gnueabihf', |
| 314 'gcc-4.8-multilib-arm-linux-gnueabihf', | 311 'gcc-4.8-multilib-arm-linux-gnueabihf', |
| 315 ) | 312 ) |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 packages = sorted(set(packages), key=packages_key) | 425 packages = sorted(set(packages), key=packages_key) |
| 429 | 426 |
| 430 if args.quick_check: | 427 if args.quick_check: |
| 431 return quick_check(packages) | 428 return quick_check(packages) |
| 432 | 429 |
| 433 return 0 | 430 return 0 |
| 434 | 431 |
| 435 | 432 |
| 436 if __name__ == '__main__': | 433 if __name__ == '__main__': |
| 437 sys.exit(main(sys.argv[1:])) | 434 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |