parallel_emerge: Work around Portage library bug with usepkg

When using --usepkg, the Portage library imported into parallel_emerge
will always return "optional" instead of "buildtime" as the deptypes
even when a package is being built from source (ie. the binary package
is not available or an uprev is occuring). This has caused years of
frustration and loathing for the DEPEND and RDEPEND variables.

This works around the problem by always treating 'optional' as a
strong package dependency when usepkg is enabled.

BUG=chromium:756240,b:64117873,chromium:741043
TEST=./setup_board for previously failing board, ./build_packages to
confirm that non-determinism in package install order is gone. (And
that coreboot builds as expected.)

Change-Id: I7c93802d5b7b82d56e86fecf4ead0eab7445762d
Reviewed-on: https://chromium-review.googlesource.com/619869
Commit-Ready: Jason Clinton <jclinton@chromium.org>
Tested-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
1 file changed