Leaf Getsrc
leaf
getsrc
- trigger source code fetching for packages
leaf getsrc or leaf getsrc MODULE [--user|--workspace|--profile] [--disable]
leaf
getsrc
command allows users to toggle the required module in source mode, and to trigger the source code fetching operation for a module.
If used without specifying any MODULE
, the command will return all available source modules within the current profile.
If used with a MODULE
parameter, the command will toggle the corresponding feature in source mode, and trigger the fetching operation (specific for each module).
Options
MODULE
A source module identifier. List of available MODULE items is returned by a simple getsrc command.
--user|--workspace|--profile
Allows a user to specify which scope needs to be configured with the feature corresponding to the required source MODULE. Allows a user to toggle a feature across all workspaces (if --user is used), across all profiles of a given workspace (if --workspace is used), or specifically to the current profile (if --profile is used; default if not specified).
--disable
Allows a user to get back to binary mode instead of source code mode.
Examples
Get source modules list
leaf getsrc
Trigger source code fetching
leaf getsrc mymodule
Get back to binary mode
leaf getsrc mymodule --disable
Behavior
As an high level command, using leaf getsrc is equivalent to chaining the following steps:
leaf feature list
Verifies if the feature corresponding to the required source module exist. It must have the same name that the MODULE, with a -src suffix (will be called MODULEFEATURE).
leaf feature query MODULEFEATURE
Then the command verifies if the feature is already toggled in source mode.
leaf feature toggle MODULEFEATURE source
If necessary, the command toggles the feature in source mode.
leaf profile sync
If necessary (if the feature value changed), the profile provisioning is triggered to update the leaf-data structure.
source fetching operation trigger
The last step is to trigger the source fetching operation. It is assumed to be handled by an executable named with MODULEFEATURE
and a -sync
suffix, provided on the $PATH
by the installed packages.
Copyright (C) Sierra Wireless Inc.