Project

Profile

Help

Task #3528

closed

Investigate which library to use for dep solving

Added by ttereshc about 6 years ago. Updated almost 4 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 38
Quarter:

Description

Current implementation of a dep solving supports only strong (Requires:) simple (package_name) dependencies.
In order to support strong (Requires:) rich (aka boolean) dependencies an external library should be used.
The suggestion is to drop the current implementation of dep solving and for any kind of a dep solving start using:
- either libdnf via its Python interface (python2-dnf)
- or libsolv via its Python bindings (python2-solv)

libdnf uses libsolv and exposes a higher level API to a user.

Both libdnf and libsolv requires repodata to perform dep solving.
Some temporary working directory should be provided to a solver to store its cache there.

Functionality of a solver we are looking for:

  • list dependencies for a given rpm package (can be a part of a synchronous task)
  • list fulfilled dependencies (from a given list of available packages) for a given rpm package
  • validate that all the dependencies (from a given list of available packages) for a given rpm package are fulfilled.
  • perform dep solving against multiple repositories

The actions mentioned above will be a part of an asynchronous task (see a copy example below).

An example of the dep solving use case in Pulp is a recursive flag during a copy: https://docs.pulpproject.org/plugins/pulp_rpm/user-guide/recipes.html?highlight=recursive#copy-errata-from-one-repository-to-another
Dep solving related functionality to support: https://pulp.plan.io/issues/2478

Example usage of the libsolv Python bindings: https://github.com/fedora-modularity/depchase
Ping ttereshc for more details about examples for libdnf case.

Figure out which library supports all required functionality. Keep in mind that performance is important as well. There could be repositories with 100K+ packages against which dep solving can be requested.


Related issues

Related to RPM Support - Issue #4152: Regression Pulp 2.17.1: recursive copy of RPMs does not copy partially resolvable dependenciesCLOSED - CURRENTRELEASEmilanActions

Also available in: Atom PDF