licensing: check for deprecated licenses at build time

We've enforced licensing checks when building the image and any
packages in there, but we should be enforcing these checks on
all packages we build, even if they aren't in the rootfs.  This
covers dev & test & SDK packages now.

BUG=chromium:401332, chromium:1019728
TEST=CQ passes

Change-Id: Id7f4086a3b5976ba7ae8a5d64a38bd471c28f378
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2303810
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/licensing/licenses_lib.py b/licensing/licenses_lib.py
index a9b01a1..849da8d 100644
--- a/licensing/licenses_lib.py
+++ b/licensing/licenses_lib.py
@@ -1440,4 +1440,5 @@
   src_dir = os.path.join(pkg_build_path, 'work')
   pkg.GetLicenses(build_info_dir, src_dir)
 
+  _CheckForDeprecatedLicense(fullnamerev, pkg.license_names)
   pkg.SaveLicenseDump(os.path.join(build_info_dir, 'license.yaml'))