ubi-agni / ros-builder-action

Github action to build .deb packages from ROS sources
https://ros.packages.techfak.net
5 stars 5 forks source link

rosbash can't be installed #5

Closed ojura closed 1 year ago

ojura commented 1 year ago

It seems like that dependencies for rosbash (python3-catkin-pkg) are broken on 22.04.

rhaschke commented 1 year ago

Please provide more details, e.g. an error message. What exactly did you try? Note that https://ros.packages.techfak.net doesn't host ROS-related python3-* packages. These come from http://packages.ros.org/ros2/ubuntu. Did you configure both sources?

ojura commented 1 year ago

Sorry for the sparse report. I thought being verbose was not necessary since it is trivial to reproduce. Just follow instructions on https://ros.packages.techfak.net/ and try installing rosbash.

This reproduces it on a clean ubuntu:jammy docker image.

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y curl lsb-release sudo

# Configure ROS 2 apt repository (for python3-rosdep, pythron3-colcon)
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /etc/apt/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list

sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros1.list
echo "# deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net $(lsb_release -cs) main-dbg" | sudo tee -a /etc/apt/sources.list.d/ros1.list

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-rosdep
rosdep init

echo "yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu" | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-one.list
rosdep update

DEBIAN_FRONTEND=noninteractive apt-get install -y ros-one-rostopic 
DEBIAN_FRONTEND=noninteractive apt-get install -y rosbash # nope

erroring out with

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-catkin-pkg : Conflicts: catkin but 0.8.10-7 is to be installed
 python3-catkin-pkg-modules : Conflicts: catkin but 0.8.10-7 is to be installed
E: Unable to correct problems, you have held broken packages.
ojura commented 1 year ago

It looks like that the problem is caused by ros.org's python-rosdep. rosbash has python3-rosdep2 in its dependency chain and it clashes with with python3-rosdep. Your ros-one-rospack package also wants these ros.org packages which break rosbash.

To compare, v4hn's ros-one-rospack depends on rosdep2, and works nice with rosbash.

rhaschke commented 1 year ago

Thanks for the clarification, which reveals the problem: You are mixing packages from ROS and Ubuntu repositories. Particularly, don't install rosbash, but use ros-one-rosbash! The same goes for python3-rosdep2: Use python3-rosdep instead. While the latter are shipped from ROS repositories, the former are outdated versions shipped with the standard Ubuntu repositories. See: https://answers.ros.org/question/359586/cannot-figure-out-whats-going-on-with-python3-rosdep2

ojura commented 1 year ago

Thanks for the clarification! One would expect that rosdep2 is newer 😅

ojura commented 1 year ago

@rhaschke, a suggestion: add a note to the readme at https://ros.packages.techfak.net/ to the line where python3-rosdep is installed, noting that ros.org's python3-rosdep is to be strongly preferred to Ubuntu's python3-rosdep2 (and if any dependency errors are encountered, the user should clean out these Ubuntu's debian-based ROS packages). It's really easy to get confused.