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>
diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh
index 25cd097..45d35bf 100755
--- a/build_library/base_image_util.sh
+++ b/build_library/base_image_util.sh
@@ -134,8 +134,8 @@
   sudo "${GCLIENT_ROOT}/chromite/licensing/licenses" \
     --board="${BOARD}" \
     --log-level error \
-    --output \
-    "${root_fs_dir}/opt/google/chrome/resources/about_os_credits.html"
+    --generate-licenses \
+    --output "${root_fs_dir}/opt/google/chrome/resources/about_os_credits.html"
 
   # Remove unreferenced gconv charsets.
   # gconv charsets are .so modules loaded dynamically by iconv_open(3),