Name

ocpidev-registry — manage an OpenCPI project registry.

Synopsis

ocpidev [<options>] <verb> registry [<name>]

DESCRIPTION

The registry noun represents an OpenCPI project registry, which is a directory that contains references to OpenCPI projects. An OpenCPI project registry is a way to manage project interdependencies. A project is automatically associated with a registry when it is created, allowing it to view and depend on other projects registered there. A project can also be registered in its associated project registry, allowing it to be visible to other projects associated there. Projects are not initially registered; the ocpidev register operation for a project can be used to register them.

The OpenCPI installation provides a default project registry at $OCPI_ROOT_DIR/project-registry. However, in some project development environments, it can be useful to have additional separate project registries for use as an alternative to the OpenCPI default.

The OpenCPI environment variable OCPI_PROJECT_REGISTRY_DIR can be set to point to an alternative project registry; setting this variable allows subsequently created projects to be associated with this registry and not with the OpenCPI default.

For more information about project registries and how to manage them, see the section "The Project Registry: How Projects Depend on and Find Each Other" in the OpenCPI Component Development Guide.

Verbs that can operate on a project registry are:

create
Create the named project registry at the specified location.
delete
Remove the named project registry from the specified location.
set
Manually associate a project with a project registry.
show
Display a list of projects registered with a project registry and their locations.
unset
Manually remove the association between a project and a project registry.

OPTIONS

In addition to the options common to all OpenCPI tools (see opencpi(1)), the options described below can be specified for operations on registries. In the following descriptions, a plus sign (+) after the option indicates that it can be specified more than once on the command line.

Options When Deleting Registries

-f
Force deletion: do not ask for confirmation when deleting a project registry. Normally, you are asked to confirm a deletion.

Options When Showing Registries

--global-scope
Display information about all project registries. This is the default scope used if -local-scope is not used.
--json
Format the output in JavaScript Object Notation (JSON) format for integration with other software.
--local-scope
Only display information about the local project registry.
--simple
Format the output as simply as possible.
--table
Display the output in an easy-to-read table. This is the default display format used if --simple or --json are not used.

EXAMPLES

  1. Create a registry ~/workspace/my-registry. Note that this registry will not have the core project registered, so you must locate and register the core project in my-registry after creating it.

    ocpidev create registry my-registry -d ~/workspace
  2. Display information about the projects in the current registry:

    ocpidev show registry
  3. Inside the project, associate the project with the default registry:

    ocpidev set registry
  4. Inside the project, associate the project with the registry named my-registry located at ~/workspace/:

    ocpidev -d ~/workspace set registry my-registry
  5. Inside the project, remove the association between the project and a registry. The next time the project is built, the default project registry will be used:

    ocpidev unset registry

BUGS

See https://www.opencpi.org/report-defects

RESOURCES

See the main web site: https://www.opencpi.org

See the OpenCPI Component Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Component_Development_Guide.pdf

SEE ALSO

ocpidev(1) ocpidev-create(1) ocpidev-delete(1) ocpidev-project(1) ocpidev-set(1) ocpidev-show(1) ocpidev-unset(1)

COPYING

Copyright (C) 2023 OpenCPI www.opencpi.org. OpenCPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.