Switching catkin workspaces carries old env vars
Often I want to switch from my main catkin workspace oldws
to sandbox workspace newws
. But sourcing setup.bash
in newws keeps adding oldws into some environment variables. As shown below, unsetting those and sourcing again doesn't help. Is there any other possible flaws??
rosman@rosmachine:~/oldws$ rm -fR build devel
rosman@rosmachine:~/newws$ rm -fR build devel
(on a new terminal)
rosman@rosmachine:~/newws$ catkin_make
rosman@rosmachine:~/newws$ source devel/setup.bash
rosman@rosmachine:~/newws$ env |grep oldws
LD_LIBRARY_PATH=~/newws/devel/lib:~/oldws/devel/lib:/opt/ros/groovy/lib
CPATH=~/newws/devel/include:~/oldws/devel/include:/opt/ros/groovy/include
PATH=~/newws/devel/bin:~/oldws/devel/bin:/opt/ros/groovy/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PYTHONPATH=~/newws/devel/lib/python2.7/dist-packages:~/oldws/devel/lib/python2.7/dist-packages:/opt/ros/groovy/lib/python2.7/dist-packages
PKG_CONFIG_PATH=~/newws/devel/lib/pkgconfig:~/oldws/devel/lib/pkgconfig:/opt/ros/groovy/lib/pkgconfig
CMAKE_PREFIX_PATH=~/newws/devel:~/oldws/devel:/opt/ros/groovy
rosman@rosmachine:~/newws$
rosman@rosmachine:~/newws$ unset CMAKE_PREFIX_PATH
rosman@rosmachine:~/newws$ unset ROS_PACKAGE_PATH
rosman@rosmachine:~/newws$ unset CPATH
rosman@rosmachine:~/newws$ unset LD_LIBRARY_PATH
rosman@rosmachine:~/newws$ unset PYTHONPATH
rosman@rosmachine:~/newws$ unset PKG_CONFIG_PATH
rosman@rosmachine:~/newws$ env |grep oldws
PATH=~/newws/devel/bin:~/oldws/devel/bin:/opt/ros/groovy/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
rosman@rosmachine:~/newws$ source devel/setup.bash
rosman@rosmachine:~/newws$ env |grep oldws
ROS_PACKAGE_PATH=~/newws/src:~/oldws/src:/opt/ros/groovy/share:/opt/ros/groovy/stacks
LD_LIBRARY_PATH=~/newws/devel/lib:~/oldws/devel/lib:/opt/ros/groovy/lib
CPATH=~/newws/devel/include:~/oldws/devel/include:/opt/ros/groovy/include
PATH=~/newws/devel/bin:~/oldws/devel/bin:/opt/ros/groovy/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PYTHONPATH=~/newws/devel/lib/python2.7/dist-packages:~/oldws/devel/lib/python2.7/dist-packages:/opt/ros/groovy/lib/python2.7/dist-packages
PKG_CONFIG_PATH=~/newws/devel/lib/pkgconfig:~/oldws/devel/lib/pkgconfig:/opt/ros/groovy/lib/pkgconfig
CMAKE_PREFIX_PATH=~/newws/devel:~/oldws/devel:/opt/ros/groovy
Using Groovy on Quantal.