Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System wide cache #46

Open
LucidOne opened this issue Dec 28, 2012 · 13 comments
Open

System wide cache #46

LucidOne opened this issue Dec 28, 2012 · 13 comments

Comments

@LucidOne
Copy link

it does not make sense to me that the rosdep cache is stored on a per-user basis

Making the cache optionally storable in /etc/ros/rosdep/sources.cache seems like a better idea, and it could be made updatable by making it group writeable by group 'ros'

@tfoote
Copy link
Member

tfoote commented Dec 29, 2012

Having a system wide cache would make for a better parallel to apt type interactions. The original design I think was targeted at making sure that the user could update their cache w/o sudo privileges.

One thing is that for fhs the data would go into /var not /etc

Having used apt a bunch recently I think that a cleaner solution would be to switch it to take an optional rootdir where it looks for both the config files and data caches like apt does using the -c option. This both allows the use of rosdep as a non root user, but also lets you actually have one system wide definition shared for the computer.

@LucidOne
Copy link
Author

On 12/29/2012 02:13 AM, Tully Foote wrote:

Having a system wide cache would make for a better parallel to apt type interactions. The original design I think was targeted at making sure that the user could update their cache w/o sudo privileges.

One thing is that for fhs the data would go into /var not /etc

Having used apt a bunch recently I think that a cleaner solution would be to switch it to take an optional rootdir where it looks for both the config files and data caches like apt does using the -c option.


Reply to this email directly or view it on GitHub:
#46 (comment)

Our current solution is running

mkdir /var/ros
chown root:ros /var/ros
chmod g+w /var/ros
rosdep init
setuidgid ros env - ROS_HOME=/var/ros rosdep update

However, it looks like it should really be in /var/cache/ros/rosdep or
/var/cache/rosdep
It looks like cups has an lp group writable /var/cache/cups directory so
this looks like a reasonable path forward.

I'll see if we can submit some patches when we finish testing this a bit
more.

@tfoote
Copy link
Member

tfoote commented Dec 30, 2012

I think /var/cache/ros/rosdep is probably best to match FHS and our common
naming patterns. I'm not sure about making the ros group and giving them
permission. If it's going to effect other users requiring the use of sudo
seems like a good idea.

@ahendrix
Copy link

+1; this bit another PR2 user today.

For power users, I think the ability to have a local branch of rosdep is important for development, but for most users I think the global cache will make life a lot easier.

On that note, +1 to #50 ; getting cache updates as part of apt-get update would save people a lot of headache.

@LucidOne
Copy link
Author

We have built some initial tests for this here
https://github.com/TurtleBot-Mfg/turtlebot-ros-groovy
It installs /etc/ros-groovy/rosdep/sources.list.d/20-default.list which AFAIK is the same as running rosdep init
update_rosdep pulls down the latest rosdep cache into /var/lib/ros/.ros so rosdep can work if installed offline
In the future rosdep init should have an argument to specify the output directory.

Also one idea to support a system wide cache would be to add it to /etc/skel so it would be available to new users or rosdep could fallback to /var/lib/ros/.ros/rosdep or /var/lib/ros/rosdep if ROS_HOME/rosdep did not exist.

The installer will also attempt to update the rosdep cache if the system is online

Once we have time to resolve the incantations for catkin we will try to generate patches for rosdep

@mikepurvis
Copy link

Did anything come of this?

We're looking as well at at least populating /etc/skel/ with a cache so that new users get something workable right off the bat, and can update later on as needed.

@wjwwood
Copy link
Contributor

wjwwood commented Oct 28, 2013

Nope, @ahendrix came by OSRF a few months ago and we talked through the proper solution, as he was dealing with problems related to the PR2 distribution, but nothing ever got done about it.

Maybe @ahendrix can summarize what we discussed, I think I had taken a picture of the whiteboard, but maybe @ahendrix took/made notes.

We simply haven't had the bandwidth to address this use case.

@mikepurvis
Copy link

It would be helpful just to have some clarity on whether the intention is to ultimately support rosdep cache in homedir with a fallback to /var, or if the plan is to stick to homedir-only.

If the second case, then the ticket should be closed with a wontfix.

@tfoote
Copy link
Member

tfoote commented Oct 29, 2013

I will need to find the notes from before, but the longer term approach was
to make it work like apt with system wide as the default, requiring sudo as
it really is a shared resource anyway. And optionally you can have your
custom one in your home directory(any custom location) with an override.

On Mon, Oct 28, 2013 at 7:24 PM, Mike Purvis notifications@github.comwrote:

It would be helpful just to have some clarity on whether the intention is
to ultimately support rosdep cache in homedir with a fallback to /var, or
if the plan is to stick to homedir-only.

If the second case, then the ticket should be closed with a wontfix.


Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-27274011
.

@NikolausDemmel
Copy link
Contributor

If a system-wide cache is the default, you would probably want the power user to not only overwrite the cache location to something in her home directory, but also the sources.lists.d? Question is if these additional source files should be considered in addition to the ones in /etc/ros/rosdep/sources.list.d, or as a complete replacement. Maybe this is already considered but I didn't get it from the discussion above.

@tfoote
Copy link
Member

tfoote commented Mar 4, 2014

I think a complete replacement. Dealing with partial overlays is very complicated. Copying a few lines of sources is much cleaner.

@NikolausDemmel
Copy link
Contributor

👍

@trainman419
Copy link

I'm proposing to fix this in #312 . Please review and comment there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants