install-build-deps.sh: Fix package_exists

package_exists() used to check if the output of 'apt-cache search' was nonempty
to check if a package is available for install.  But it does not work in some
cases.  For example, on Debian Testing, libgtk-3-0-dbg is not available, but
libgtk-3-0-dbgsym is.  This package would show up in the apt-cache output and we
would incorrectly determine that libgtk-3-0-dbg was available.  Additionally,
there can be more than one package that is listed.

This CL does a check for the exact package name.

BUG=785818
[email protected]

Change-Id: Ic81f1c059223e3cec643e116dea26b30c9ac75f1
Reviewed-on: https://chromium-review.googlesource.com/791371
Commit-Queue: Thomas Anderson <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#519415}
1 file changed