Adding a recipe to the workspace layer

To create a new recipe we use the following syntax:

$ devtool add <recipe-name> <source path> <fetch-uri>

Here,

  • recipe-name is the name of the recipe
  • source path is the local path to the source code
  • fetch-uri is the URI to fetch the source from if it does not exist locally

New recipes are added to the recipes folder on the workspace layer. When creating a new recipe, the source code can either be fetched from a URI and placed on the source path or must already exist locally in the source path. If the source path is not provided, devtool will store it in the source folder on the workspace layer.

The devtool add sub-command is a wrapper around the recipetool create command-line utility.

Existing recipes can also be added to the workspace layer. Find the recipe you are interested in by providing a regular expression pattern with the following command:

$ devtool search <pattern>

Devtool can then extract the source of an existing recipe, set it up as a Git repository with a specified branch name or a devtool branch by default, and apply the patches from the existing recipe. We do all of those steps with the modify sub-command, as follows:

$ devtool modify <recipe-name>

Finally, instead of modifying an existing recipe, it can be upgraded to a new upstream version with the following command:

$ devtool upgrade <recipe-name> <source path>

Again, if no source code path is specified the sources folder inside the workspace layer will be used. Alternatively, if the source for the recipe is fetched from Git the following command is used:

$ devtool upgrade <recipe-name> --srcrev <git-sha1> --srcbranch <git-branch> <source path>

Here,

  • recipe-name is the name of the recipe
  • git-sha1 is the git revision to check out
  • git-branch is the git branch to use
  • source path is the local path to store the source code into

Recipes added to the workspace layer can be listed, along with their respective source code paths, with the following command:

$ devtool status
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset