# Big workspace management

**URL:** <https://discourse.openrobotics.org/t/big-workspace-management/437>\
**Category:** Buildfarm\
**Created:** [August 19, 2016, 11:14am UTC](https://discourse.openrobotics.org/t/big-workspace-management/437 "2016-08-19T11:14:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rayman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rayman/32/268_2.png) [@Rayman](https://discourse.openrobotics.org/u/Rayman)\
**Post date:** [August 19, 2016, 11:14am UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/1 "2016-08-19T11:14:20Z")

</div>

Hey, I have a question about how to manage the workspace of a large collection of packages (~50/100). My main question is how to setup this workspace. We have a large number of unreleased packages and a few forked versions of official packages.

Can I use `rosinstall_generator` to recursively check out the source repositories of my custom packages? I tried a forked rosdistro but apparently `rosinstall_generator` does not check out dependencies of unreleased packages. Is there an other way?

---

<div class="post-metadata">

**Author:** ![Andriy](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Andriy](https://discourse.openrobotics.org/u/Andriy)\
**Post date:** [August 19, 2016, 2:17pm UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/2 "2016-08-19T14:17:33Z")

</div>

Hey Rayman,

In our [“Shadow’s Build Tools”](http://wiki.ros.org/CIs#Shadow_Robot.27s_Build_Tools) we put all source code dependencies for repository in the file [repository.rosinstall](https://github.com/shadow-robot/build-servers-check/blob/indigo-devel/repository.rosinstall). During the build system will pull all those repositories from Git into local workspace and if those repositories have repository.rosinstall it will do it for them as well for several levels. It is using wstool feature [merge rosinstall files](http://wiki.ros.org/wstool#Merge_in_Additional_rosinstall_Files).

So you may reuse this approach or even give a try to the whole “Shadow’s Build Tools” solution which is really easy to setup.

---

<div class="post-metadata">

**Author:** ![dirk-thomas](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dirk-thomas/32/4328_2.png) [@dirk-thomas](https://discourse.openrobotics.org/u/dirk-thomas)\
**Post date:** [August 19, 2016, 2:57pm UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/3 "2016-08-19T14:57:01Z")

</div>

Hi Rayman,

the information about the dependencies of a package comes from its  
manifest. If your packages refer to names which are not part of the  
rosdistro the tool can’t resolve the source repository for them. And for  
repositories which are not released no packages and therefore no manifests  
and recursive dependencies are known.

I would suggest to put all your custom repos (including the forks) in a  
`.rosinstall` file (optionally with the distributed approach Andriy  
mentioned) and fill the dependencies using `rosdep` from binary packages.

---

<div class="post-metadata">

**Author:** ![Rayman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rayman/32/268_2.png) [@Rayman](https://discourse.openrobotics.org/u/Rayman)\
**Post date:** [August 19, 2016, 3:10pm UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/4 "2016-08-19T15:10:52Z")

</div>

Thanks for the quick response. I’ll give the distributed solution of @Andriy a try.

Just a quick question, the manifests `rosinstall_generator` needs are cached in the in the `<distro>-cache.yaml.gz` file generated by `rosdistro_build_cache`? I’m trying to figure out how the whole system works.

---

<div class="post-metadata">

**Author:** ![dirk-thomas](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dirk-thomas/32/4328_2.png) [@dirk-thomas](https://discourse.openrobotics.org/u/dirk-thomas)\
**Post date:** [August 19, 2016, 3:21pm UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/5 "2016-08-19T15:21:40Z")

</div>

Correct, a Jenkins job regenerates the cache every 5 minutes. It makes all  
manifests of released packages available without having to fetch them from  
each release repo. This is the data the `rosinstall_generator` as well as  
the build farm mainly operate on.

The cache only contains the manifests of released packages since only for  
them it is clear when they have changed. Basically when the version number  
of the release changed. For source repositories it would require to  
constantly check the repository content since it can change without any  
change to the rosdistro files.

---

<div class="post-metadata">

**Author:** ![Mike\_Purvis](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mike_purvis/32/264_2.png) [@Mike\_Purvis](https://discourse.openrobotics.org/u/Mike_Purvis)\
**Post date:** [August 19, 2016, 8:56pm UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/6 "2016-08-19T20:56:15Z")

</div>

Hi Rayman,

Presently rosinstall\_generator only works for released packages, but there are pending PRs on rosdistro which enable it to work with source repos as well, please check it out if interested: [SourceDependencyWalker, and cache updating by mikepurvis · Pull Request #84 · ros-infrastructure/rosdistro · GitHub](https://github.com/ros-infrastructure/rosdistro/pull/84)

Clearpath is primarily deploying our ROS software now using rosinstall\_generator-based bundles; you can see a small prototype of this idea here if it’s of interest: [GitHub - mikepurvis/ros-bundling: Demonstrations of ROS deployment using bundle deb packages.](https://github.com/mikepurvis/ros-bundling)

---

<div class="post-metadata">

**Author:** ![Rayman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rayman/32/268_2.png) [@Rayman](https://discourse.openrobotics.org/u/Rayman)\
**Post date:** [August 20, 2016, 9:09am UTC](https://discourse.openrobotics.org/t/big-workspace-management/437/7 "2016-08-20T09:09:47Z")

</div>

Nice, that patch would really help my use case! I could probably do the following

- define a custom ros distro with our source repositories
- use `rosinstall_generator` to resolve dependencies and use wstool to check out all these source repos
- finally use rosdep to resolve the standard ros depdendencies

I hope I can find time next week to try out your patch.
