Import ros2 source package with version info
Hi,
I am compiling ros2 source package to debian 11 platform
vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos
This outputs
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: humble
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: humble
...
...
There is no version specified for each package. This poses a challenge, that every single time i run my ci/cd pipeline, it pulls the latest packages. Is there are any other way or other tools where I can download the packages along with the versions.
Thanks
Asked by BhanuKiran.Chaluvadi on 2023-06-09 05:36:09 UTC
Answers
UPDATE: As in comment section, this answer may not offer a straight-forward resolution to the OP's problem. Yet, in a hope that it gives some generic detail about vcstool
's usage that may not be well documented, I keep it posted.
There is no version specified for each package.
There ARE versions specified. In the ament/ament_cmake
example you posted, it's humble
.
The "version
" terminology in vcstool
may be indeed a bit undocumented IINM. This field can take branch / tag
of the vcs tool of the choice (e.g. git
) of each repo.
So in the ament/ament_cmake
example again, "humble" seems to be the name of a branch "version" on that repo, which means, yes it'll fetch the latest on that branch.
You can create your own .repos
file (to e.g. modify version fields) and supply it to vcs import
command by e.g.
vcs import src < ./foo/baa.repos
Asked by 130s on 2023-06-09 05:58:08 UTC
Comments
As @gvdhoom mentioned. I will stick with checkout to the release branch. Is it possible to promote your comment to the accept answer ?
Asked by BhanuKiran.Chaluvadi on 2023-06-15 01:53:41 UTC
Ah, ok, I failed to notice the question was specifically about ros2.repos
file on ros2
repo, released versions of which surely contain the specific version of each repo. I converted Gijs' comment to an answer.
Asked by 130s on 2023-06-15 02:07:37 UTC
You can create your own
.repos
file (to e.g. modify version fields)
You don't have to. Just checkout
one of the release tags instead of a branch.
If you don't want to use a specific tag, the latest release would be available on the $ROS_DISTRO-release
branches. humble-release for Humble fi.
Asked by gvdhoorn on 2023-06-09 13:41:28 UTC
Comments