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

download command resolves dependencies for packages independently #971

Open
m-blaha opened this issue Oct 12, 2023 · 1 comment
Open

download command resolves dependencies for packages independently #971

m-blaha opened this issue Oct 12, 2023 · 1 comment

Comments

@m-blaha
Copy link
Member

m-blaha commented Oct 12, 2023

This may lead to incomplete downloads in some edge-cases:
Let's say we have two packages:

  • libtool which requires gcc
  • rpm-build which has conditional requirement (annobin-plugin-gcc if gcc)

None of these packages is currently installed.

Then dnf5 download --resolve libtool rpm-build will not download annobin-plugin-gcc (because gcc is not installed), but when you attempt to install these packages from downloaded rpm files, installation will fail on missing dependency (because gcc is part of install set):

# dnf5 download --resolve libtool rpm-build
...
annobin-plugin-gcc is not downloaded
...
# createrepo_c .
# dnf5 --repofrompath=a,. --repoid=a install libtool rpm-build
Updating and loading repositories:
 a                                               100% |   0.0   B/s |  45.6 KiB |  00m00s
Repositories loaded.
Failed to resolve the transaction:
Problem: package redhat-rpm-config-252-1.fc38.noarch requires (annobin-plugin-gcc if gcc), but none of the providers can be installed
  - package redhat-rpm-config-252-1.fc38.noarch requires (gcc-plugin-annobin if gcc), but none of the providers can be installed
  - package rpm-build-4.18.1-3.fc38.x86_64 requires system-rpm-config, but none of the providers can be installed
  - package libtool-2.4.7-6.fc38.x86_64 requires gcc(major) = 13, but none of the providers can be installed
  - conflicting requests

The root-cause is that download command resolves dependencies of downloaded packages independently, one-by-one. This may lead to some conditional dependencies being skipped.

See also related dnf issue: rpm-software-management/dnf#2002

@j-mracek
Copy link
Contributor

Thank you very much for catching it. There is another use case when performing of resolve in one transaction might create an issue. If you have two packages that conflict between each other.

There are many packages that conflict but as an example we can use - ocaml-dune wdune.

Be honest I am not sure what is better and more frequent use case or whether it would make sense to make it configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants