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

ROS_ETC_DIR inconsistency #582

Closed
paulbovbel opened this issue Feb 8, 2018 · 7 comments
Closed

ROS_ETC_DIR inconsistency #582

paulbovbel opened this issue Feb 8, 2018 · 7 comments

Comments

@paulbovbel
Copy link

It appears that this PR (#551) has introduced an issue where sudo rosdep init will write to /etc/ros/rosdep/sources.list.d, while rosdep update will try to read from whichever environment is sourced, typically /opt/ros/$ROS_DISTRO/etc/ros/rosdep/sources.list.d.

@dirk-thomas
Copy link
Member

dirk-thomas commented Feb 8, 2018

@paulbovbel Can you please provide more detailed information: what platform are you on, what are your environment variables set to, exact sequence of steps to reproduce.

@allenh1 Since you created the referenced patch can you please look into this.

@allenh1
Copy link
Contributor

allenh1 commented Feb 8, 2018

@dirk-thomas I can certainly do that -- will give it a go in a container in a little bit and let you know what I get.

@paulbovbel
Copy link
Author

paulbovbel commented Feb 8, 2018

Reproduction on a clean xenial container:

# preliminary
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list &&
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 &&
sudo apt-get update &&
sudo apt-get install ros-kinetic-ros-base python-pip

# install rosdep 0.12.0
sudo pip install rosdep==0.12.0

# rosdep update fails
source /opt/ros/kinetic/setup.bash &&
sudo rosdep init &&
rosdep update

@allenh1
Copy link
Contributor

allenh1 commented Feb 8, 2018

Okay, I found something after looking into this.

root@c1cf676de24c:~# echo ${ROS_ETC_DIR}

root@c1cf676de24c:~# source /opt/ros/kinetic/setup.bash 
root@c1cf676de24c:~# echo ${ROS_ETC_DIR}
/opt/ros/kinetic/etc/ros

The environment variable gets set by /opt/ros/kinetic/etc/catkin/profile.d/10.ros.sh, which belongs to ros-kinetic-roslib.

@dirk-thomas Perhaps a better patch would be to introduce a ROSDEP_ETC_DIR instead? Let me know and I'll jump right on it.

@dirk-thomas
Copy link
Member

Since the reference PR breaks the behavior of rosdep update when a setup file has been sourced I will go ahead and revert the change and release a new patch version of rosdep. @paulbovbel Thank you bringing this up.

@allenh1 Please feel free to create a follow up PR to allow different locations for the rosdep source files. I just don't want to wait for a patch, testing it, let others comment and review to address the regression.

@allenh1
Copy link
Contributor

allenh1 commented Feb 8, 2018

I just don't want to wait for a patch, testing it, let others comment and review to address the regression.

That's a fair point -- this is certainly not good. My apologies, I should have tested sourcing setup.bash before running sudo rosdep init.

I've got a proposed fix up for it, which I will test far more thoroughly.

@dirk-thomas
Copy link
Member

The referenced change has been reverted in #584 and a new version 0.12.1 has been released.

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

3 participants