| 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'}, | 16 {'number': '12.04', 'codename': 'precise'}, |
| 17 {'number': '14.04', 'codename': 'trusty'}, | 17 {'number': '14.04', 'codename': 'trusty'}, |
| 18 {'number': '14.10', 'codename': 'utopic'}, | 18 {'number': '14.10', 'codename': 'utopic'}, |
| 19 {'number': '15.04', 'codename': 'vivid'}, | 19 {'number': '15.04', 'codename': 'vivid'}, |
| 20 {'number': '15.10', 'codename': 'wily'}, |
| 20 ) | 21 ) |
| 21 | 22 |
| 22 | 23 |
| 23 # Packages needed for chromeos only. | 24 # Packages needed for chromeos only. |
| 24 _packages_chromeos_dev = ( | 25 _packages_chromeos_dev = ( |
| 25 'libbluetooth-dev', | 26 'libbluetooth-dev', |
| 26 'libxkbcommon-dev', | 27 'libxkbcommon-dev', |
| 27 'realpath', | 28 'realpath', |
| 28 ) | 29 ) |
| 29 | 30 |
| 30 | 31 |
| 31 # Packages needed for development. | 32 # Packages needed for development. |
| 32 _packages_dev = ( | 33 _packages_dev = ( |
| 33 'apache2.2-bin', | |
| 34 'bison', | 34 'bison', |
| 35 'cdbs', | 35 'cdbs', |
| 36 'curl', | 36 'curl', |
| 37 'devscripts', | 37 'devscripts', |
| 38 'dpkg-dev', | 38 'dpkg-dev', |
| 39 'elfutils', | 39 'elfutils', |
| 40 'fakeroot', | 40 'fakeroot', |
| 41 'flex', | 41 'flex', |
| 42 'fonts-thai-tlwg', | 42 'fonts-thai-tlwg', |
| 43 'g++', | 43 'g++', |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 'python-psutil', | 96 'python-psutil', |
| 97 'python-yaml', | 97 'python-yaml', |
| 98 'rpm', | 98 'rpm', |
| 99 'ruby', | 99 'ruby', |
| 100 'subversion', | 100 'subversion', |
| 101 'ttf-dejavu-core', | 101 'ttf-dejavu-core', |
| 102 'ttf-indic-fonts', | 102 'ttf-indic-fonts', |
| 103 'ttf-kochi-gothic', | 103 'ttf-kochi-gothic', |
| 104 'ttf-kochi-mincho', | 104 'ttf-kochi-mincho', |
| 105 'wdiff', | 105 'wdiff', |
| 106 'xfonts-mathml', | |
| 107 'zip', | 106 'zip', |
| 108 ) | 107 ) |
| 109 | 108 |
| 110 | 109 |
| 111 # Run-time libraries required by chromeos only. | 110 # Run-time libraries required by chromeos only. |
| 112 _packages_chromeos_lib = ( | 111 _packages_chromeos_lib = ( |
| 113 'libbz2-1.0', | 112 'libbz2-1.0', |
| 114 'libpulse0', | 113 'libpulse0', |
| 115 ) | 114 ) |
| 116 | 115 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 _packages_nacl += ('libudev1:i386',) | 352 _packages_nacl += ('libudev1:i386',) |
| 354 else: | 353 else: |
| 355 _packages_dev += ('libudev0',) | 354 _packages_dev += ('libudev0',) |
| 356 _packages_nacl += ('libudev0:i386',) | 355 _packages_nacl += ('libudev0:i386',) |
| 357 | 356 |
| 358 if package_exists('libbrlapi0.6'): | 357 if package_exists('libbrlapi0.6'): |
| 359 _packages_dev += ('libbrlapi0.6',) | 358 _packages_dev += ('libbrlapi0.6',) |
| 360 else: | 359 else: |
| 361 _packages_dev += ('libbrlapi0.5',) | 360 _packages_dev += ('libbrlapi0.5',) |
| 362 | 361 |
| 362 if package_exists('apache2-bin'): |
| 363 _packages_dev += ('apache2-bin',) |
| 364 else: |
| 365 _packages_dev += ('apache2.2-bin',) |
| 366 |
| 367 if package_exists('fonts-stix'): |
| 368 _packages_dev += ('fonts-stix',) |
| 369 else: |
| 370 _packages_dev += ('xfonts-mathml',) |
| 371 |
| 363 # Some packages are only needed if the distribution actually supports | 372 # Some packages are only needed if the distribution actually supports |
| 364 # installing them. | 373 # installing them. |
| 365 if package_exists('appmenu-gtk'): | 374 if package_exists('appmenu-gtk'): |
| 366 _packages_lib += ('appmenu-gtk',) | 375 _packages_lib += ('appmenu-gtk',) |
| 367 | 376 |
| 368 _packages_dev += _packages_chromeos_dev | 377 _packages_dev += _packages_chromeos_dev |
| 369 _packages_lib += _packages_chromeos_lib | 378 _packages_lib += _packages_chromeos_lib |
| 370 _packages_nacl += _packages_naclports | 379 _packages_nacl += _packages_naclports |
| 371 | 380 |
| 372 | 381 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 packages = sorted(set(packages), key=packages_key) | 430 packages = sorted(set(packages), key=packages_key) |
| 422 | 431 |
| 423 if args.quick_check: | 432 if args.quick_check: |
| 424 return quick_check(packages) | 433 return quick_check(packages) |
| 425 | 434 |
| 426 return 0 | 435 return 0 |
| 427 | 436 |
| 428 | 437 |
| 429 if __name__ == '__main__': | 438 if __name__ == '__main__': |
| 430 sys.exit(main(sys.argv[1:])) | 439 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |