Skip to content
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

Fix handling of duplicate dependencies #902

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valgur
Copy link

@valgur valgur commented Oct 13, 2022

Duplicates in resolved dependencies are uncommon, but one such case is ffmpeg and libswscale-dev, where both depend on the libswscale-dev apt package. Trying to install them simultaneously fails with

ERROR: the following rosdeps failed to install
  apt: Failed to detect successful installation of [libswscale-dev]
  apt: Failed to detect successful installation of [libswscale-dev]

This appears to be caused by debian._read_apt_cache_showpkg() assuming a roughly one-to-one correspondence between the packages input list and the output lines from apt-cache showpkg. Due to the latter ignoring any duplicates, the resulting list of dependencies to be installed gets corrupted and some of them will fail to be installed.

As a fix, this PR removes any duplicates in the list of resolved dependencies (without affecting the order).

The rest of the code implicitly assumes no duplicates in the deps list and fails in some cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant