Chromium Code Reviews| Index: build/install-build-deps.sh |
| diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh |
| index dce19310a7d87b61b9d0761cd0a06104c4a19ad9..9acd05ea25d3d146338f1d439187269784180621 100755 |
| --- a/build/install-build-deps.sh |
| +++ b/build/install-build-deps.sh |
| @@ -68,7 +68,7 @@ yes_no() { |
| # Checks whether a particular package is available in the repos. |
| # USAGE: $ package_exists <package name> |
| package_exists() { |
| - apt-cache pkgnames | grep -x "$1" > /dev/null 2>&1 |
| + [ ! -z "`apt-cache search --names-only "$1"`" ] |
| } |
| # These default to on because (some) bots need them and it keeps things |
| @@ -111,7 +111,7 @@ if ! which lsb_release > /dev/null; then |
| fi |
| lsb_release=$(lsb_release --codename --short) |
| -ubuntu_codenames="(precise|trusty|utopic|vivid|wily|xenial)" |
| +ubuntu_codenames="(precise|trusty|utopic|vivid|wily|xenial|jessie)" |
|
Dirk Pranke
2016/12/07 23:43:23
since jessie is a debian thing, not a ubuntu thing
Tom (Use chromium acct)
2016/12/08 01:31:17
Done.
|
| if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then |
| if [[ ! $lsb_release =~ $ubuntu_codenames ]]; then |
| echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ |
| @@ -284,11 +284,6 @@ dev_list="${dev_list} libgbm-dev${mesa_variant} |
| nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" |
| # Some package names have changed over time |
| -if package_exists ttf-mscorefonts-installer; then |
| - dev_list="${dev_list} ttf-mscorefonts-installer" |
| -else |
| - dev_list="${dev_list} msttcorefonts" |
| -fi |
| if package_exists libnspr4-dbg; then |
| dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" |
| lib_list="${lib_list} libnspr4 libnss3" |
| @@ -331,6 +326,14 @@ if package_exists php7.0-cgi; then |
| else |
| dev_list="${dev_list} php5-cgi libapache2-mod-php5" |
| fi |
| +# ttf-mscorefonts-installer is in the Debian contrib repo, which has |
| +# dependencies on non-free software. Install it only if the user has already |
| +# enabled contrib. |
| +if package_exists ttf-mscorefonts-installer; then |
| + dev_list="${dev_list} ttf-mscorefonts-installer" |
| +elif package_exists msttcorefonts; then |
| + dev_list="${dev_list} msttcorefonts" |
| +fi |
| # Ubuntu 16.04 has this package deleted. |
| if package_exists ttf-kochi-gothic; then |
| dev_list="${dev_list} ttf-kochi-gothic" |