sfx2: Report cached manifest in archive
The firmware archive repacked by sfx2 has already cached the manifest
in archive.  This allows us to report the cached version and avoid
redundant scanning.
On a Nissa device (yaviks_ufs)
 time ./signed_deflate_updater --mode=autoupdate # 30s -> 13s
 time ./signed_lzma_updater    --mode=autoupdate # 90s -> 13s
BUG=b:372456796
TEST=./pack_firmware_functest.py
Change-Id: I46bc89f0e77f9788bf2519a3771a97a013abba15
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/firmware/+/6069626
Auto-Submit: Jian-Jia Su <jjsu@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Jian-Jia Su <jjsu@chromium.org>
diff --git a/pack/sfx2.sh b/pack/sfx2.sh
index e1007ca..22ed5c6 100755
--- a/pack/sfx2.sh
+++ b/pack/sfx2.sh
@@ -137,7 +137,7 @@
   # here for informational purposes.  Check the output of "crosid" for
   # what futility uses.
   local model="$(cros_config /firmware image-name || cros_config / name || echo unknown)"
-  local manifest="$(sh "${self}" --manifest 2>/dev/null)"
+  local manifest="$(sh "${self}" --manifest --fast 2>/dev/null)"
   local package="$(echo "${manifest}" |
     jq -c ".${model}.host.versions" 2>/dev/null)"
   local swwp="1"