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

dnf: Implement DependsOn and RequiredBy #495

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

Conversation

Conan-Kudo
Copy link
Member

@Conan-Kudo Conan-Kudo commented Jul 4, 2021

This allows software centers to make decisions based on the
dependency tree.

Fixes: #106

@Conan-Kudo
Copy link
Member Author

This PR currently doesn't actually have the logic implemented, mostly because I'm not sure how to do it yet. However, I figured creating this PR would make it easier to solicit some guidance on what I should be doing, or even if my starting approach is even right.

@dmach, @j-mracek, @jrohel, @hughsie: I would appreciate any help given here...

@hughsie
Copy link
Collaborator

hughsie commented Jul 5, 2021

make decisions based on the dependency tree

What's the 40,000ft use case? You have to be careful, and this is usually why SIMULATE gives you better results for what's going to happen.

@Conan-Kudo
Copy link
Member Author

Conan-Kudo commented Jul 5, 2021

The main use-case for implementing this is that Plasma Discover 5.22 now uses this for informing the user of what will change on installation or removal of an application. In the future, it may be used to implement heuristics for determining when to trigger offline updates.

@hughsie
Copy link
Collaborator

hughsie commented Jul 5, 2021

for informing the user of what will change on installation or removal of an application

You need to use SIMULATE for this. There's no way of showing the correct results without knowing what you're going to do, i.e. what the rest of the transaction looks like.

@Conan-Kudo
Copy link
Member Author

But that wouldn't also show what it depends on that's already installed, would it?

@hughsie
Copy link
Collaborator

hughsie commented Jul 5, 2021

No, it should show you the INSTALLING/REMOVING/UPDATING packages just like a normal "install" would do.

@Conan-Kudo
Copy link
Member Author

Maybe I'm not explaining this correctly, so perhaps a picture shows this better:

screenshot_20210409_080123

This is from Plasma Discover on openSUSE with the Zypp backend. This currently doesn't work on Fedora or openSUSE with the DNF backend.

@hughsie
Copy link
Collaborator

hughsie commented Jul 5, 2021

Ahh yes; for this kind of thing it's fine -- my point was based on the assumption you wanted "if I installed this what else would have to be installed"

@Conan-Kudo
Copy link
Member Author

I've been up for too many hours, I'm bad at words now. 😛

💤

@hughsie
Copy link
Collaborator

hughsie commented Jul 5, 2021

Okay, lets fix up the FIXMEs and then LGTM.

This allows software centers to make decisions based on the
dependency tree.
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.

hif: RFE: Implement dependency querying (pk_backend_depends_on, pk_backend_required_by)
2 participants