API¶
-
class
rpmdeplint.
DependencyAnalyzer
(repos, packages, arch=None)¶ An object which checks packages against provided repos for dependency satisfiability.
Construct an instance for a particular set of packages you want to test, with the repos you want to test against. Then call the individual checking methods to perform each check.
Parameters: - repos – An iterable of
rpmdeplint.repodata.Repo
instances - packages – An iterable of RPM package paths to be tested
-
solvables
= None¶ List of
solv.Solvable
to be tested (corresponding to packages parameter)
-
repos_by_name
= None¶ Mapping of {repo name:
rpmdeplint.repodata.Repo
}
-
try_to_install_all
()¶ Try to solve the goal of installing each of the packages under test, starting from an empty package set.
Returns: Tuple of (bool ok?, DependencySet
)
-
find_repoclosure_problems
()¶ Checks for any package in the repos which would have unsatisfied dependencies, if the packages under test were added to the repos.
This applies some extra constraints to prevent the solver from finding a solution which involves downgrading or installing an older package, which is technically a valid solution but is not expected if the packages are supposed to be updates.
Returns: List of str problem descriptions if any problems were found
-
find_conflicts
()¶ Find undeclared file conflicts in the packages under test.
Returns: List of str describing each conflict found (or empty list if no conflicts were found)
-
find_upgrade_problems
()¶ Checks for any package in the repos which would upgrade or obsolete the packages under test.
Returns: List of str describing each upgrade problem found (or empty list if no problems were found)
- repos – An iterable of
-
class
rpmdeplint.
DependencySet
¶ Contains dependency information from trying to install the packages under test.
-
overall_problems
¶ List of str dependency problems found (if any)
-
packages_with_problems
¶ List of
solv.Solvable
which had dependency problems
-
package_dependencies
¶ Dict in the form {package: {‘dependencies’: list of packages, ‘problems’: list of problems}}
-
-
class
rpmdeplint.repodata.
Repo
(repo_name, baseurl=None, metalink=None)¶ Represents a Yum (“repomd”) package repository to test dependencies against.
Parameters: - repo_name – Name of the repository, for example “fedora-updates” (used in problems and error messages)
- baseurl – URL or filesystem path to the base of the repository (there should be a repodata subdirectory under this)
- metalink – URL to a Metalink file describing mirrors where the repository can be found
Exactly one of the baseurl or metalink parameters must be supplied.
-
classmethod
from_yum_config
()¶ Yields Repo instances loaded from the system-wide Yum configuration in
/etc/yum.conf
and/etc/yum.repos.d/
.