build_image/licensing: Generate missing license information.

When build_image generates the licensing credits page, it will now
generate license information for any packages that don't already have
it generated.

In theory, this is never needed. In practice, it can happen because of
things like locally cached binary packages that are outdated.

This change has little to no impact on performance if all packages
are present, but it will hurt performance when that data is
missing. This means that if we ever stop generating this data for some
or all packages, we'll only notice because build_image gets slower.

BUG=chromium:432793
TEST=Ran build_image in a clean tree with/without this change and compared
     timings (both flavors varied between 3:39 and 3:50 min).

Change-Id: I3d9ee248aff22b9e59af46daca13d7cea1c10e23
Reviewed-on: https://chromium-review.googlesource.com/230211
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
1 file changed