bdcs-0.1.0: Tools for managing a content store of software packages

Copyright(c) 2016-2017 Red Hat Inc.
LicenseLGPL
Maintainerhttps://github.com/weldr
Stabilityalpha
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

BDCS.Depclose

Description

Collect all the dependencies for a package, but do not solve them.

Synopsis

Documentation

type DepFormula = Formula (Key Groups) Source #

Type of the depclose results - see Formula

depclose :: (MonadError String m, MonadIO m) => [Text] -> [Text] -> SqlPersistT m DepFormula Source #

Given a path to a mddb, a list of architectures, and a list of RPMS, return a formula describing the dependencies The general idea is, given a list of packages to depclose, convert each to a group id, and for each id: - gather the conflict and obsolete information, find matching group ids, express as Not conflict/obsolete-id - gather the requirement expressions, for each: * find a list of matching group ids * if empty, the dependency is not satisfiable * recurse on each group id to gather the requirements of the requirement * return the expression as an Or of the matching group ids - return the whole thing as an And [self, conflict/obsolete information, requirement information]

Everything is run in a state with two components: a Map from groupid to expression to act as a cache, and a Set containing the group ids that are part of the current branch of the dependency tree in order to detect and ignore loops.