ros-tooling/setup-ros

Melodic broken packages

Closed this issue · 19 comments

Description

Hey : trying to setup CI for a driver package using your Github Actions toolbox. During the setup step, the process failed, supposedly due to unmet dependency to install ros-melodic-desktop.

name: ROS Continuous Integration

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  build-and-test:
    runs-on: ubuntu-18.04
    steps:
    - name: Setup ROS Melodic
      uses: ros-tooling/setup-ros@0.0.15
      with:
        required-ros-distributions: melodic

Expected Behavior

Clean installation of ros melodic on the environment. ( tested the same script with eloquent, it went smoothly. )
Also tested the same script with kinetic, installation failed

EDIT : Kinetic installation failure is normal, as it's not supported with ubuntu 18.04. Kinetic setup works fine with 16.04.

Actual Behavior

Invoking "sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes ros-melodic-desktop"
  sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes ros-melodic-desktop
  Reading package lists...
  Building dependency tree...
  Reading state information...
  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:
   ros-melodic-desktop : Depends: ros-melodic-common-tutorials but it is not going to be installed
                         Depends: ros-melodic-geometry-tutorials but it is not going to be installed
                         Depends: ros-melodic-robot but it is not going to be installed
                         Depends: ros-melodic-ros-tutorials but it is not going to be installed
                         Depends: ros-melodic-urdf-tutorial but it is not going to be installed
                         Depends: ros-melodic-visualization-tutorials but it is not going to be installed
                         Depends: ros-melodic-viz but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.
##[error]The process 'sudo' failed with exit code 100

To Reproduce

Error occured for this repo. Just use the rosci.yml file in .github/workflows to reproduce the error.

System (please complete the following information)

  • OS: Ubuntu 18.04
  • ROS Distro : Melodic

Additional context

Just trying to figure out your tool for later projects.

Thanks for bringing this up! We are investigating now and will update this ticket when we have more information.

setup-ros CI works, but not action-ros-ci. My guess is that there is a cache coherency issue on OSRF APT repo, as we had a sync recently. Let's try to see if this is the case. Otherwise, GitHub Actions may also attempt to do some caching on the apt repo which may backfire? (less likely, as this is also happening inside standard Ubuntu docker containers, which are unlikely to be instrumented by GH actions).

@thomas-moulard but it never gets to the step using action-ros-ci ?
There's no problem using Kinetic or Eloquent.

setup-ros is self-contained, action-ros-ci relies on setup-ros so there is no step in setup-ros invoking action-ros-ci if I understand your comment correctly.

I was referring to the CI of both projects, sorry if it was unclear.

See here for instance: https://github.com/ros-tooling/setup-ros/runs/533749125?check_suite_focus=true

  • "Run /./"
  • Invoking "sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes ros-melodic-desktop"

setup-ros can install melodic in this case.

@thomas-moulard would you expect the following to be the same? From the setup-ros and action-ros-ci runs:

setup-ros apt-get update, successful overall

  Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
  Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
  Get:3 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [832 kB]
  Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
  Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
  Get:6 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
  Get:7 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
  Get:8 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
  Get:9 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [7904 B]
  Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [861 kB]
  Get:11 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [35.2 kB]
  Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
  Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [48.7 kB]
  Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [11.9 kB]
  Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1362 kB]
  Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1155 kB]
  Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B]
  Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4247 B]

action-ros-ci apt-get update, from the latest failure

 Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
  Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
  Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
  Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
  Hit:6 https://packages.microsoft.com/repos/azure-cli bionic InRelease
  Hit:7 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease
  Hit:8 https://download.mono-project.com/repo/ubuntu stable-bionic InRelease
  Hit:9 http://packages.cloud.google.com/apt cloud-sdk InRelease
  Hit:11 https://dl.yarnpkg.com/debian stable InRelease
  Get:10 https://cli-assets.heroku.com/apt ./ InRelease [2,879 B]
  Hit:12 https://storage.googleapis.com/bazel-apt stable InRelease
  Hit:13 http://dl.google.com/linux/chrome/deb stable Release
  Hit:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
  Hit:14 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic InRelease
  Hit:15 http://security.ubuntu.com/ubuntu bionic-security InRelease
  Get:16 http://packages.ros.org/ros/ubuntu bionic InRelease [4,669 B]
  Get:17 http://packages.ros.org/ros2/ubuntu bionic InRelease [3,947 B]
  Hit:19 http://ppa.launchpad.net/apt-fast/stable/ubuntu bionic InRelease
  Ign:20 https://dl.bintray.com/sbt/debian  InRelease
  Get:21 https://dl.bintray.com/sbt/debian  Release [815 B]
  Hit:18 https://packagecloud.io/github/git-lfs/ubuntu bionic InRelease
  Hit:22 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease
  Hit:23 http://ppa.launchpad.net/hvr/ghc/ubuntu bionic InRelease
  Hit:24 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
  Hit:25 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
  Err:10 https://cli-assets.heroku.com/apt ./ InRelease
    The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5DC22404A6F9F1CA
  Get:27 http://packages.ros.org/ros/ubuntu bionic/main amd64 Packages [635 kB]
  Get:28 http://packages.ros.org/ros2/ubuntu bionic/main amd64 Packages [608 kB]
  Fetched 1,256 kB in 3s (459 kB/s)
  Reading package lists...
  W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://cli-assets.heroku.com/apt ./ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5DC22404A6F9F1CA
  W: Failed to fetch https://cli-assets.heroku.com/apt/./InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5DC22404A6F9F1CA
  W: Some index files failed to download. They have been ignored, or old ones used instead.

That's interesting indeed, I guess that could be related. It'd be weird for apt-get update to trash the whole process update for a single repo being broken, but I'm not sure.

I was able to reproduce the issue following the steps for this failure using an ubuntu:18.04 docker container. Investigating.

Update: using aptitude in a docker container env I was able to view package conflicts

The following packages have unmet dependencies:
python-rosdistro : Conflicts: python3-rosdistro but 0.8.0-100 is installed
python3-rosdistro : Conflicts: python-rosdistro but 0.8.0-100 is to be installed
python-catkin-pkg : Conflicts: python3-catkin-pkg but 0.4.16-100 is installed
python-rospkg : Conflicts: python3-rospkg but 1.2.3-100 is installed
python3-catkin-pkg : Conflicts: python-catkin-pkg but 0.4.16-100 is to be installed
python3-rospkg : Conflicts: python-rospkg but 1.2.3-100 is to be installed

Removing these packages resulted in a successful install.

Edit: to be clear these dependencies appear to be mangled when using the setup-ros dependency steps, whereas following the instructions here to install Melodic on Ubuntu work as expected.

Note: removing this step (manually executing in a docker container) allows the install to proceed as expected:

sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes libssl-dev python3-dev build-essential clang cmake git lcov libc++-dev libc++abi-dev python3-lark-parser python3-pip python3-rosdep python3-vcstool wget libasio-dev libtinyxml2-dev libopensplice69 rti-connext-dds-5.3.1

What if you just remove python3-rosdep from that line

What if you just remove python3-rosdep from that line

Following your recommendation results in an expected install, but leaves python3-rosdep with unment dependencies:

 python3-rosdep : Depends: python3-catkin-pkg but it is not going to be installed
                  Depends: python3-rosdistro but it is not going to be installed
                  Depends: python3-rospkg but it is not going to be installed
                  Depends: python3-rosdep-modules (>= 0.18.0) but it is not going to be installed

python-rosdep can be installed just fine.

Weird, python3-rosdep-modules complains about unmet dependencies from python3-catkin-pkg, python3-rosdistro, and python3-rospkg but installing them via

sudo apt install python3-catkin-pkg python3-rosdistro python3-rospkg

then

apt install python3-rosdep-modules

and finally

sudo apt install python3-rosdistro

results in success.

I mirrored the setup-ros steps using an ubuntu 18.04 docker container that resulted in a successful install. Note that instead of installing python3-rosdep I installed python-rosdep.

apt update

apt-get install --no-install-recommends --quiet --yes sudo

sudo bash -c echo 'Etc/UTC' > /etc/timezone

sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes curl gnupg2 locales lsb-release

sudo locale-gen en_US en_US.UTF-8

sudo ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime

sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes tzdata

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

sudo echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list

sudo echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros2-latest.list

sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes libssl-dev python3-dev build-essential clang cmake git lcov libc++-dev libc++abi-dev python3-lark-parser python3-pip python3-vcstool wget libasio-dev libtinyxml2-dev libopensplice69 rti-connext-dds-5.3.1 python-rosdep

sudo pip3 install --upgrade argcomplete catkin_pkg colcon-bash==0.4.1 colcon-cd==0.1.1 colcon-cmake==0.2.16 colcon-common-extensions==0.2.1 colcon-core==0.4.3 colcon-defaults==0.2.2 colcon-lcov-result==0.2.0 colcon-library-path==0.2.1 colcon-metadata==0.2.2 colcon-mixin==0.1.6 colcon-notification==0.2.10 colcon-output==0.2.6 colcon-package-information==0.3.0 colcon-package-selection==0.2.5 colcon-parallel-executor==0.2.4 colcon-pkg-config==0.1.0 colcon-powershell==0.3.6 colcon-python-setup-py==0.2.2 colcon-recursive-crawl==0.2.0 colcon-ros==0.3.13 colcon-test-result==0.3.8 coverage cryptography empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes ifcfg lark-parser mock mypy nose pep8 pydocstyle pyparsing pytest pytest-cov pytest-mock pytest-repeat pytest-rerunfailures pytest-runner setuptools wheel

sudo rosdep init

sudo DEBIAN_FRONTEND=noninteractive RTI_NC_LICENSE_ACCEPTED=yes apt-get install --no-install-recommends --quiet --yes ros-melodic-desktop

However, when trying this in actions this fails due to other unmet dependencies.

Fix in review: #77 (review)

Fix has been merged setup-ros 0.0.16 should fix this issue.

Fixed, thanks to everyone!

Does this also solve #50 ?

Does this also solve #50 ?

I don't think so

0.0.16 has been released, fixing this issue.