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: Ie96bc62f2c7c710d61659403c91153287b4291a8
Reviewed-on: https://chromium-review.googlesource.com/178875
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Commit-Queue: Yu-Ju Hong <yjhong@chromium.org>
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
1 file changed