Is there a
dnf repoquery --requires --resolve
option that makes it pick among dependency options the same as dnf install
automatically does?
---
## Problem
I need to download an RPM and all its recursive dependencies for offline install, using a system that doesn't have sudo
permissions and doesn't have exactly the same existing packages installed on it. This means I can't simply use dnf install --downloadonly --destdir
since it both requires sudo
permissions and will only download the dependencies that aren't present on the current system (my target system has a more limited list of what's currently installed). So I have to recursively resolve all dependencies of a package manually, then pass that list of NEVRA format packages to the dnf download
command.
However, I've found that when you use dnf repoquery --requires --resolve {package}
, it will list every possible package that can provide the direct requirements and not just the "best" one like dnf install {package}
automatically picks.
## Example of problem
For example, dnf repoquery --requires --resolve curl
lists both libcurl
and libcurl-minimal
, which are conflicting packages and are expected to be options you choose between to satisfy the dependency. Tracing this, dnf repoquery --deplist curl
lists that requirement libcurl >= {version}
can be satisifed by a few versions each of libcurl-{version}
and libcurl-minimal-{version}
. This matches with the idea that libcurl
and libcurl-minimal
are alternative options to one another.
Compare this to when I run dnf install curl
, and it just automatically picks the "best" libcurl
dependency and chooses libcurl-{version}
.
## Question
So since dnf install {package}
somehow automatically picks which single provider of a requirement to install, how do I query to determine what that would be when I seemingly can't actually run dnf install
directly due to sudo
permission limits and needing to include dependencies that are already installed on the system I'm performing the download from?
---
I am also aware of the dnf download --resolve --alldeps
(from dnf core plugins) that will resolve dependencies the same was as dnf install
when resolving the requires, however I also need to prune dependencies and their branches for some things like basesystem
and that's not possible with dnf download
.
Asked by mtalexan
(316 rep)
Dec 20, 2023, 05:26 PM
Last activity: Dec 21, 2023, 03:35 PM
Last activity: Dec 21, 2023, 03:35 PM