pub async fn download_and_apply_update(
channel_name: &str,
version: &str,
omaha_cfg: Option<OmahaConfig>,
) -> Result<(), UpdateError>Expand description
Installs all packages and writes the Fuchsia ZBI from the latest build on the given channel.
The following conditions are expected to be met:
- Network services (fuchsia.net.name.Lookup and fuchsia.posix.socket.Provider) are available in the /svc/ directory.
pkg-recovery.cmlshould be a child of this component, and all dependencies specified in its ‘offer’ section should be available in the out directory of the component running this code prior to this function being called.
If successful, a reboot should be the only thing necessary to boot Fuchsia.
§Arguments
channel_name- The channel to update from.version- Version to report as the current installed version.omaha_cfg- The |OmahaConfig| to use for Omaha. If None, the update will not use Omaha to determine the updater URL.