Leaf Update

leaf update - updates packages within a leaf profile

$ leaf update [-p PACKAGE ...]

leaf update update the packages in a leaf profile to another package (i.e.; a different version).

-p|--add-package PACKAGE

Package identifier to be added/updated to the current profile. The package identifier will be accepted in two formats:

  • NAME: the latest available version with the package NAME will be added to the profile
  • NAMEVERSION: the specified version will be added to the profile
Note
The -p option can be used multiple times.

If no -p option is specified, leaf update will try to update the package configured in the current profile to the latest available version (marked as latest in leaf search).

Examples

Update all packages to the latest version

Assuming that you're already working with a current profile:

$ leaf update

Update the profile to a new package (works even for downgrade)

Assuming that current profile uses mysdk package in version 2:

$ leaf update -p mysdkv1

Add another package to profile

Assuming that current profile uses mysdk package:

$ leaf update -p anotherPackage

Behaviors

leaf update can be used either to update your profile to the latest version, downgrade to an older version, or add a new package to the profile. As an high level command, using leaf update is equivalent to chaining the following steps:

$ leaf search

An implicit search is performed to look at the available packages, matching with the profile content.

$ leaf profile config -p PACKAGE

For each specified -p option, or if it is not specified for each new version of the profile packages, configuration is updated to point to the new version.

$ leaf profile sync

The profile provisioning will be triggered to install the required packages (if necessary) and refresh the leaf-data structure.