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

Is there a way to handle Requires(Pretrans) dependency in a single transaction #1337

Closed
keerthanakalyan opened this issue Aug 20, 2020 · 1 comment

Comments

@keerthanakalyan
Copy link

I have a package A with package B as Requires(pretrans) dependency. While trying to install pkg A if B is not already installed on the system it gives "error: Failed dependencies". Even though I add package B as part of the installation.

#] $ rpm -ivh B-1.0-1.x86_64.rpm A-1.1-1.x86_64.rpm
error: Failed dependencies:
        B is needed by A

I verified the same in dnf and it gives the same dependency error.
Does RPM provide any API to query the Requires(pretrans) dependencies and create two transactions in package managers instead of a single transaction?

@pmatilai
Copy link
Member

As per the name, a pretrans dependency has to be present prior to transaction start and cannot be satisfied by other packages in the transaction, because the transaction hasn't started at that point! That behavior is the whole point of that special dependency type.

The dependency info is of course queriable via API (and cli), but rpm doesn't offer any special aid to construct multiple transactions in such a situation, it's up to the API user to do so.

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

No branches or pull requests

2 participants