make_chroot: Pass $USEPKG and $USEPKGONLY when building glibc/binutils.

Toolchain packages like glibc, binutils etc. should only be built
from source when "--nousepkg" is passed. Linux-headers is also
in this list as it matches the exisiting behavior of crossdev's
cross-* packages.

Define a new USEPKGONLY variable and use it to force toolchain
packages from being built from source.
This fixes the reported issue of glibc being built from source when
entering a newly created chroot.

BUG=chromium:976914
TEST=glibc not built when entering a new chroot.

Change-Id: I0cf0456ffafd117dbb571999352acf46b4406ca6
Reviewed-on: https://chromium-review.googlesource.com/1668010
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed