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

Handle virtual deb packages when querying apt cache #1023

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ros_buildfarm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ def get_distribution_repository_keys(urls, key_files):
def get_binary_package_versions(apt_cache, debian_pkg_names):
versions = {}
for debian_pkg_name in debian_pkg_names:
pkg = apt_cache[debian_pkg_name]
pkg = apt_cache.get(debian_pkg_name)
if not pkg:
prov = apt_cache.get_providing_packages(debian_pkg_name)
assert len(prov) == 1
pkg = apt_cache[prov[0]]
versions[debian_pkg_name] = max(pkg.versions).version
return versions

Expand Down
Loading