Bug 847003 - RFE: greedy dependency resolving
Summary: RFE: greedy dependency resolving
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hawkey
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-09 12:20 UTC by Martin Gracik
Modified: 2014-09-30 23:40 UTC (History)
4 users (show)

Fixed In Version: hawkey-0.2.9-1
Clone Of:
Environment:
Last Closed: 2012-09-17 22:52:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Gracik 2012-08-09 12:20:57 UTC
It would be nice if hawkey could do greedy dependency resolving. Adding all packages that provide some requirement, not just the best package.

Comment 1 Ales Kozumplik 2012-08-09 14:33:44 UTC
There are two general approaches:

a) let the hawkey clients do this themselves: after all, the simplest case is just traversing the requirements graph. But that requires exposing the requirements (bug 847006) in some suitable format, which again is tricky. Also one of the premises of hawkey is that it won't need the user to do things like graph traversing.

b) provide a Goal.run() flag that would list all solutions instead of just the best solution. A union of these is the greedy result you're looking for. I like this solution better especially because it nicely handles the case where a requirement-providing package is itself not installable (for instance missing its own requirement). At this time I unfortunately don't know how well is libsolv capable of this.

Comment 2 Ales Kozumplik 2012-08-21 13:04:03 UTC
Fixed with the b) approach, master commits 5e83e28 and d431efa.

A simple example how to use this is shown in a unit test:
https://github.com/akozumpl/hawkey/blob/master/tests/python/tests/test_goal.py#L34

the corresponding repo:
https://github.com/akozumpl/hawkey/blob/master/tests/repos/greedy.repo

Comment 3 Michael Schröder 2012-08-21 13:38:28 UTC
A union will probably not work, as the different providers will sometimes conflict with each other.

I'm also not sure what the exact requirement is. Is it that the solver should install all the providers while solving a dependency of some package or is it more about installing all providers of a dependency provided on the command line?

Comment 4 Ales Kozumplik 2012-08-21 14:57:49 UTC
(In reply to comment #3)
> A union will probably not work, as the different providers will sometimes
> conflict with each other.
> 
> I'm also not sure what the exact requirement is. Is it that the solver
> should install all the providers while solving a dependency of some package
> or is it more about installing all providers of a dependency provided on the
> command line?

I think what Martin is really after is some 'repoquery' functionality, in this case trying to find a list of all packages that (directly or indirectly) satisfy some requirement of the original package (for the outlined solution to make sense the 'installed' repo also needs to be empty). The result is not going to be used in a transaction, as conflicts should be expected.

Comment 5 Fedora Update System 2012-08-23 12:08:04 UTC
hawkey-0.2.9-1.git8599c55.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/hawkey-0.2.9-1.git8599c55.fc18

Comment 6 Fedora Update System 2012-08-23 15:37:18 UTC
Package hawkey-0.2.9-1.git8599c55.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.2.9-1.git8599c55.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12561/hawkey-0.2.9-1.git8599c55.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-09-17 22:52:02 UTC
hawkey-0.2.9-1.git8599c55.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.