Leaf Profile
leaf
profile
- manage profiles in a leaf workspace
$ leaf profile [list] [PROFILE...] $ leaf profile create PROFILE $ leaf profile rename NEWNAME $ leaf profile delete [PROFILE...] $ leaf profile switch PROFILE $ leaf profile sync [PROFILE] $ leaf profile config [PROFILE] [-p PACKAGE ...] [-rm-package PACKAGE ...]
leaf
profile
manages profiles in a leaf workspace. The workspace must exist before the leaf profile command can be used (see leaf setup).
Sub-Commands
list
Lists the profiles in the workspace. (default option)
Only the requested PROFILE item(s) will be listed. If nothing specified, all profiles will be listed.
Depending on the -q|-v
options, the output information is:
[blank]: displays a table for all PROFILE (with a [current] tag next to the current profile), plus all the configured packages
-v
: as above, plus the package dependencies and environment variables (see leaf env)-q
: displays only PROFILE list
- Note
- The list command must be specified if one of the
-q|-v
option is specified.
create
Creates a new empty profile named PROFILE.
The command will fail if PROFILE
profile name is already used by another profile.
rename
Renames current profile to NEWNAME.
The command will fail if NEWNAME profile name is already used by another profile.
delete
Deletes the profile(s) named PROFILE from the workspace (or the current profile if PROFILE is not specified).
- Note
- If the current profile is deleted, the first profile (in the leaf-workspace.json file order) is switched as current.
switch
Switches the profile named PROFILE
as the current one.
The leaf-data/current symbolic link is updated to point to the PROFILE folder.
sync
Triggers the profile synchronization operation, for profile named PROFILE or current profile (if PROFILE is not specified)
Profile synchronization is composed of the following steps:
- for each package configured in the profile, leaf makes sure the package is installed
- if not, each missing package is installed (see leaf package install)
- once all packages are installed, the PROFILE folder in leaf-data is refreshed with symbolic links to installed packages
- if packages are defining synchronization hooks, the hooks are executed
config
Allows to modification of the profile named PROFILE
(or current profile if PROFILE
is not specified) by adding or removing packages (see options below)
toolsLeafProfile_Options
PROFILE
,NEWNAME
The profile name, must be unique in a workspace.
-p|--add-package PACKAGE
Package identifier for the package that you wish to install. 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 leaf search command can be used to display the available packages.
- A given package NAME can exist only one time in a given profile. If the -p option is used to add a package NAME which is already configured in the profile, the new VERSION will replace the existing one.
--rm-package PACKAGE
Package ID to be removed from the profile.
Examples
List profiles:
$ leaf profile
List profiles with more details:
$ leaf profile list -v
Create profiles:
$ leaf profile create MYPROFILE && leaf profile create aProfile
Rename profile:
$ leaf profile rename theProfile
Delete profile:
$ leaf profile delete theProfile
Switch profile:
$ leaf profile switch MYPROFILE
Configure profile:
$ leaf profile config -p myPackage -p myOtherPackage1.2 && leaf profile config --rm-package myOtherPackage
Synchronize profile:
$ leaf profile sync
Copyright (C) Sierra Wireless Inc.