Copyright | (c) 2016-2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Collect all the dependencies for a package, but do not solve them.
- type DepFormula = Formula (Key Groups)
- depcloseGroupIds :: (MonadError String m, MonadIO m) => [Text] -> [Key Groups] -> SqlPersistT m DepFormula
- depcloseNEVRAs :: (MonadError String m, MonadIO m) => [Text] -> [Text] -> SqlPersistT m DepFormula
- depcloseNames :: (MonadError String m, MonadIO m) => [Text] -> [Text] -> SqlPersistT m DepFormula
Documentation
depcloseGroupIds :: (MonadError String m, MonadIO m) => [Text] -> [Key Groups] -> SqlPersistT m DepFormula Source #
Given a path to a mddb, a list of architectures, and a list of Group Ids, 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.
depcloseNEVRAs :: (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 See depcloseGroupIds for further details
depcloseNames :: (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 package names, return a formula describing the dependencies See depcloseGroupIds for further details