licensing: Add presubmit check for license errors

If an ebuild is modified, check if the LICENSE field in the ebuild is
whitespace delimited, and whether the the license(s) stated in the
ebuild exsits in the stock or custom directories. Note that some
packages have copyright file in their source, this presubmission check
does not check the source and may display an error in this case.

BUG=chromium:318364
CQ-DEPEND=CL:177398
CQ-DEPEND=CL:177693
TEST=repo upload with incorrect licenses

Change-Id: I795f28a8fe7eb10bd3b0ca0fc3c07af81f1037fc
Reviewed-on: https://chromium-review.googlesource.com/177441
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Commit-Queue: Yu-Ju Hong <yjhong@chromium.org>
1 file changed