diff options
| author | 2023-03-07 14:08:42 +0000 | |
|---|---|---|
| committer | 2023-03-07 14:08:42 +0000 | |
| commit | d6d021897ca71475b3cd5055cafdc0f9bf8ac519 (patch) | |
| tree | ea0abc3daef38f259fc2712ac00df6891b8bffd5 | |
| parent | 7912dda83a5bf653c87d8d14b86421c5795a5ff5 (diff) | |
| parent | cb861cc145f6c66677146b62766982fb23ce8e35 (diff) | |
Merge changes Ie98c9fec,I2de6bc77 am: 3f242853cd am: 00d9ad4444 am: cb861cc145
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2469755
Change-Id: I1ba0a0ae2a86676f335d03ddf26c26b44d6f90a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | cmds/installd/otapreopt.cpp | 4 | ||||
| -rw-r--r-- | cmds/installd/otapreopt_script.sh | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp index 6a3120c1b7..bf2c0d1023 100644 --- a/cmds/installd/otapreopt.cpp +++ b/cmds/installd/otapreopt.cpp @@ -308,7 +308,7 @@ private: // This is different from the normal installd. We only do the base // directory, the rest will be created on demand when each app is compiled. if (access(GetOtaDirectoryPrefix().c_str(), R_OK) < 0) { - LOG(ERROR) << "Could not access " << GetOtaDirectoryPrefix(); + PLOG(ERROR) << "Could not access " << GetOtaDirectoryPrefix(); return false; } @@ -460,7 +460,7 @@ private: // this tool will wipe the OTA artifact cache and try again (for robustness after // a failed OTA with remaining cache artifacts). if (access(apk_path, F_OK) != 0) { - LOG(WARNING) << "Skipping A/B OTA preopt of non-existing package " << apk_path; + PLOG(WARNING) << "Skipping A/B OTA preopt of non-existing package " << apk_path; return true; } diff --git a/cmds/installd/otapreopt_script.sh b/cmds/installd/otapreopt_script.sh index f950276090..db5c34edc2 100644 --- a/cmds/installd/otapreopt_script.sh +++ b/cmds/installd/otapreopt_script.sh @@ -60,6 +60,11 @@ print -u${STATUS_FD} "global_progress $PROGRESS" i=0 while ((i<MAXIMUM_PACKAGES)) ; do + DONE=$(cmd otadexopt done) + if [ "$DONE" = "OTA complete." ] ; then + break + fi + DEXOPT_PARAMS=$(cmd otadexopt next) /system/bin/otapreopt_chroot $STATUS_FD $TARGET_SLOT_SUFFIX $DEXOPT_PARAMS >&- 2>&- @@ -67,13 +72,8 @@ while ((i<MAXIMUM_PACKAGES)) ; do PROGRESS=$(cmd otadexopt progress) print -u${STATUS_FD} "global_progress $PROGRESS" - DONE=$(cmd otadexopt done) - if [ "$DONE" = "OTA incomplete." ] ; then - sleep 1 - i=$((i+1)) - continue - fi - break + sleep 1 + i=$((i+1)) done DONE=$(cmd otadexopt done) |