In order for the upgrade state to be completed, upgrade_progress_status
must be equal to 100. Previously this value was set by the
online-update-success service, but this service is executed after the
upgrade-manager service. As a result, the upgrade state is never
switched from "ready" to "completed" preventing clone_partitions from
taking its job.
The solution is to take over the responsibility for setting the upgrade
progress status by the update.sh script instead of the
online-update-success.sh (which is executed from online-update-success
service). This way handling of the progress becomes unified regardless
of the upgrade type.
Change-Id: I1d599251986dac7a378a44545e8dcce285ccab89
/usr/bin/device_board_clear_boot_mode
if ! COMMIT_CHANGES; then
ERROR "FAIL: Commit changes error"
+ SET_UPGRADE_PROGRESS_STATUS -1
reboot -f fota
fi
/usr/bin/device_board_clear_partition_ab_cloned
/usr/bin/device_board_set_boot_success
- SET_UPGRADE_PROGRESS_STATUS 100
reboot -f
else
reboot -f fota
/usr/bin/device_board_clear_boot_mode
if ! COMMIT_CHANGES; then
ERROR "FAIL: Commit changes error"
+ SET_UPGRADE_PROGRESS_STATUS -1
reboot -f fota
fi
/usr/bin/device_board_clear_partition_ab_cloned
/usr/bin/device_board_set_boot_success
- SET_UPGRADE_PROGRESS_STATUS 100
else
reboot -f fota
fi
rm ${STATUS_FILE}
COMMIT_CHANGES
fi
+
+SET_UPGRADE_PROGRESS_STATUS 100
#Reboot by offline-update-post.service