Skip to content

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