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 virtual package resolution #146

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

Conversation

dillon-giacoppo
Copy link

@dillon-giacoppo dillon-giacoppo commented Dec 22, 2024

Currently, a simple install of bash produces the following error:

WARNING: Following dependencies could not be resolved for bash: awk

In identifying the root cause of this issue, found a few behaviors for the Provides key are not correct (as described by the spec here).

Fixed the following in Provides:

  • Handle multiple packages, i.e. Provides: bar, baz.
  • Handle unversioned packages, i.e. Provides: bar and Provides: bar (= 1.0) are both valid.
  • Ensure alternatives (referred in code as dependency groups) are evaluated left-to-right and added to unmet_deps if none resolve.
  • Handle multiple candidates for virtual packages if can fallback to a single Priority: required package.
  • Resolve multiple virtual package candidates from the same package to the highest available version.

The usage of Priority: required is necessary to account for Distroless base images not containing the "true" minimal package set as described here: https://wiki.debian.org/Proposals/EssentialOnDiet. This creates a problem for package dependencies like awk which expect to find mawk by default. A potential future improvement could resolve ambiguous virtual packages by picking an explicit package in the manifest.

Fixes to the Provides handling leads to significantly more virtual packages being identified and resolved correctly.

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