Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598537 - ros-catkin.eclass installs files to /usr/etc instead of /etc
Summary: ros-catkin.eclass installs files to /usr/etc instead of /etc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-30 14:34 UTC by Tim Rakowski
Modified: 2016-11-28 15:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Rakowski 2016-10-30 14:34:49 UTC
Stuff get's installed in /usr/etc:

$ ls -R /usr/etc
/usr/etc:
catkin  ros

/usr/etc/catkin:
profile.d

/usr/etc/catkin/profile.d:
10.ros.sh  10.rosbuild.sh  10.roslaunch.sh  15.rosbash.bash  15.rosbash.fish  15.rosbash.tcsh  15.rosbash.zsh  20.transform.bash  99.roslisp.sh

/usr/etc/ros:
genmsg  python_logging.conf  roscore.xml

/usr/etc/ros/genmsg:
gencpp  geneus  genlisp  gennodejs  genpy

Even though ros packages expect it to be in /etc. See /usr/lib64/python3.4/site-packages/rosgraph/roslogging.py:

104         # search for logging config file in /etc/.  If it's not there,
105         # look for it package-relative.
106         fname = 'python_logging.conf'
107         rosgraph_d = rospkg.RosPack().get_path('rosgraph')
108         for f in [os.path.join(rospkg.get_ros_home(), 'config', fname),
109                   '/etc/ros/%s'%(fname),
110                   os.path.join(rosgraph_d, 'conf', fname)]:
111             if os.path.isfile(f):
112                 config_file = f
113                 break
114         else:
115             config_file = None
116 
117     if config_file is None or not os.path.isfile(config_file):
118         # logging is considered soft-fail
119         sys.stderr.write("WARNING: cannot load logging configuration file, logging is disabled\n")

The error message in the last line is how I noticed this issue.

python_logging.conf get's installed in two locations (https://github.com/ros/ros_comm/blob/kinetic-devel/tools/rosgraph/CMakeLists.txt):

install(FILES conf/python_logging.conf
  DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/ros)
install(FILES conf/python_logging.conf
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/conf)

Currently, the second one ends up at /usr/share/rosgraph/conf/python_logging.conf but the code above looks at 

os.path.join(rospkg.get_ros_home(), 'config', fname)

which results in /usr/share/ros_packages/rosgraph/conf/python_logging.conf (notice the extra "ros_packages"), because

$ rospack find rosgraph
/usr/share/ros_packages/rosgraph

I could have posted this as a bug report for rosgraph, but I guess that this has to be fixed in ros-catkin.eclass because other packages are affected as well (evidenced by the files in /usr/etc).
Comment 1 Alexis Ballier gentoo-dev 2016-11-28 15:12:09 UTC
should be fixed by those commits I think:

commit 2701f4e2ecddcdce15248edf2f4d66936b3187ef
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 16:04:16 2016 +0100

    dev-ros/pluginlib: look for package.xml in ros_packages too for plugins.
    
    Package-Manager: portage-2.3.2

commit b12c2eefa7918914d610e06154fb399f02e9a743
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 15:32:24 2016 +0100

    dev-ros/rviz_plugin_tutorials: drop install path patch now that rospack returns a correct one.
    
    Package-Manager: portage-2.3.2

commit b3b61d6cd9e7b3f3b6cc9fb2fd1ad46365751608
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 15:31:35 2016 +0100

    dev-ros/rviz: stop patching now that rospack returns proper package path
    
    Package-Manager: portage-2.3.2

commit e504013dc705a9ab392b14b65716f9b02833ad3c
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 15:30:30 2016 +0100

    dev-ros/rospack: add custom patch to return proper package paths with our package.xml moved to ros_packages.
    
    Package-Manager: portage-2.3.2

commit 8bc7911162549024c93e51bb6dfc24694f822b32
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 15:15:02 2016 +0100

    dev-ros/rviz: remove old
    
    Package-Manager: portage-2.3.2

commit 00242c045f5742c0abdfa6fc75aabf9c51a32580
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 14:56:38 2016 +0100

    dev-util/catkin: add some comments in the etc patch
    
    Package-Manager: portage-2.3.2

commit b33ece56c59ae0b1c186af967c552efaa9dcd361
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Nov 28 14:55:54 2016 +0100

    dev-util/catkin: set global etc destination to /etc, part of bug #598537
    
    Package-Manager: portage-2.3.2