To help update_engine perform A/B update, we modify component updater API as following:
1. LoadComponent (existing):
LoadComponent [component_name| [mount] (optional) [next_milestone](optional)
Note: when |next_milestone| is given, component updater goes into A/B update mode - updating A partition as usually while updating B partition to |next_milestone|. On failure of either A or B, LoadComponent API reports failure.
2. AutoUpdate (new):
AutoUpdate |next_milestone|
Note: This API performs AutoUpdate (calling LoadComponent with next_milestone) for all installed components.
This API also sets an internal state(next_milestone) in component updater. All subsequent call to LoadComponent needs to perform A/B update.
Comment 1 by xiaochu@chromium.org
, Apr 23 2018