Skip to content

Commit

Permalink
Documented ROSDEP_CACHE_PATH and ROSDEP_SOURCE_PATH.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Pecka <[email protected]>
  • Loading branch information
peci1 committed Jan 2, 2023
1 parent fd7bb5f commit 0141233
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,30 @@ rosdep gets its data from.
``rosdep update`` reads through this sources list to initialize your
local database.

You can override the location by setting environment variable
``ROSDEP_SOURCE_PATH``. The custom path has to exist prior to calling
``rosdep init``, otherwise the default one will be used.

Please note that when using ``sudo``, environment
variables from the user are not passed to the command. To specify the variable
for initializing the database, call::

sudo mkdir -p /usr/rosdep.sources
sudo env ROSDEP_SOURCE_PATH=/usr/rosdep.sources rosdep init

Updating rosdep
---------------

You can update your rosdep database by running::

rosdep update

If you have specified a custom ``ROSDEP_SOURCE_PATH``, do not forget to set it
also for this command.

Default location of the local rosdep database is in ``$HOME/.ros/rosdep``.
To change it, set environment variable ``ROSDEP_CACHE_PATH``, or pass
command-line arguments ``--sources-cache-dir`` and ``--meta-cache-dir``.

Installating rosdeps
--------------------
Expand Down Expand Up @@ -95,5 +112,9 @@ dependencies::



If you specified a custom ``ROSDEP_CACHE_PATH`` or used command-line arguments
``--sources-cache-dir`` and ``--meta-cache-dir``, you have to pass these to
all rosdep commands used afterwards, including ``rosdep install``.

For more information, please see the :ref:`command reference <rosdep_usage>`.

20 changes: 20 additions & 0 deletions doc/sources_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ Sources list file format
``/etc/ros/rosdep/sources.list.d``. ``sudo rosdep init`` will create
a default configuration for you.

You can override the location by setting environment variable
``ROSDEP_SOURCE_PATH``. The custom path has to exist prior to calling
``rosdep init``, otherwise the default one will be used.

Please note that when using ``sudo``, environment
variables from the user are not passed to the command. To specify the variable
for initializing the database, call::

sudo mkdir -p /usr/rosdep.sources
sudo env ROSDEP_SOURCE_PATH=/usr/rosdep.sources rosdep init

If you point ``ROSDEP_SOURCE_PATH`` to a user-writable directory, you can avoid
obtaining root privileges, so you can just call::

mkdir -p $HOME/my_rosdep_sources
ROSDEP_SOURCE_PATH=$HOME/my_rosdep_sources rosdep init

Be aware that ``~`` is not expanded in ``ROSDEP_SOURCE_PATH``, so you should
specify an absolute path.

rosdep processes the files in this directory, sorted by filename in
ascending order. Precedence is assigned to the files in the order
they are processed, with the first file having the highest
Expand Down

0 comments on commit 0141233

Please sign in to comment.