-
Notifications
You must be signed in to change notification settings - Fork 47
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
Do not remove catkin file, breaks robostack environment #622
Do not remove catkin file, breaks robostack environment #622
Conversation
did you look at #52 ? It seems that there is a test failing without this removal, but I'm not sure which one. |
I think the "issue" happens when you build a package that uses catkin to find dependencies outside a catkin workspace (or a catkin package outside a catkin workspace) This will create a I think we can keep the existing behavior if we surround this code with For reference, |
Not exactly my case. The code is built with cmake and without dependencies from Catkin packages.
Quite the opposite. Robostack already installs the
I could try this, but I would first encourage discussing if this existing behaviour is good. My current understanding is this is not a good policy, but probably I am ignoring something. |
Dear @cmastalli I would not recommend installing from source a package in a conda prefix. Why not using a local workspace after sourcing your robostack ROS environment ? |
Sorry if this was unclear. I was referring to the original issue that brought the code here but you are right, your scenario is basically the reverse of that (installing into a catkin prefix out of a catkin workspace) so my proposed approach would still break your scenario maybe the alternative is for jrl-cmakemodules to check whether the file already exists when the configuration happens and never touch the file in that case since it's probably not installed by the package we are currently building. |
I install them inside the conda prefix so I can have multiple installations of packages such as Pinocchio and Crocoddyl. I know I could create different installation folders and create a bash script, but I am lazy :) Do you have other suggestions? |
Yes, this suggestion looks better to me. Although, I am unsure how to do it. Do you have some clues? |
Push the binary packages in robostack. |
Using the cache to check on the first run (or when CMAKE_INSTALL_PREFIX changes) if the if(NOT DEFINED PACKAGE_CREATES_DOT_CATKIN OR NOT "${PACKAGE_PREVIOUS_INSTALL_PREFIX}" EQUAL "${CMAKE_INSTALL_PREFIX}")
set(PACKAGE_PREVIOUS_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "Cache install prefix given to the package")
if(EXISTS "${CMAKE_INSTALL_PREFIX}/.catkin")
set(PACKAGE_CREATES_DOT_CATKIN FALSE CACHE INTERNAL "")
else()
set(PACKAGE_CREATES_DOT_CATKIN TRUE CACHE INTERNAL "")
endif()
endif()
# Then pass PACKAGE_CREATES_DOT_CATKIN to the cmake_uninstall script and act accordingly |
5ca6421
to
ba21c1c
Compare
@gergondet -- I pushed these changes and tested them on my PC, and of course, they work! |
00e1d32
to
32cc728
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you also need to pass -DPACKAGE_CREATES_DOT_CAKTIN=${PACKAGE_CREATES_DOT_CATKIN}
to the script (before -P
here https://github.com/cmastalli/jrl-cmakemodules/blob/topic/catkin-uninstall/uninstall.cmake#L64) unless it somehow reads it from the cache?
d25532d
to
ea08f24
Compare
This also adds a test to make sure it works as expected
Fix the tests, they have been broken since we require CMake >= 3.10
58e2c78
to
6b33181
Compare
Hi @cmastalli I have added passing I have also made sure the tests actually fail when there is a failure. Since we introduce the strict requirement on CMake >= 3.10 none the tests have not passed but those failures were not showing up as such. |
Thanks for including the unit tests and your feedback, @gergondet ! This feature fixes annoying issues encountered during the installation of many of my packages :) |
This PR suggests removing the procedure for uninstalling catkin files. This is breaking ROS1 conda environments every time we need to re-install a package.
I don't also understand the reason for having these lines, but it seems we shouldn't do this.