Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides simple dependency graph making for rpm packages:
import Distribution.RPM.Build.Graph
graph <- createGraph
["pkg1", "pkg2", "../pkg3"]
Synopsis
- type PackageGraph = Gr FilePath ()
- createGraph :: [FilePath] -> IO PackageGraph
- createGraphRpmOpts :: [String] -> [FilePath] -> IO PackageGraph
- createGraph1 :: Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph2 :: [String] -> Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph3 :: [String] -> [String] -> Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph4 :: Bool -> [String] -> [String] -> Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph' :: Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph'' :: [String] -> Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph''' :: [String] -> [String] -> Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- createGraph'''' :: Bool -> [String] -> [String] -> Bool -> Bool -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- dependencyNodes :: [FilePath] -> PackageGraph -> [FilePath]
- subgraph' :: Gr a b -> [Node] -> Gr a b
- packageLayers :: PackageGraph -> [[FilePath]]
- lowestLayer :: PackageGraph -> [FilePath]
- lowestLayer' :: PackageGraph -> [LNode FilePath]
- packageLeaves :: PackageGraph -> [FilePath]
- separatePackages :: PackageGraph -> [FilePath]
- printGraph :: PackageGraph -> IO ()
- renderGraph :: PackageGraph -> IO ()
- depsGraph :: Bool -> [String] -> Bool -> [String] -> [String] -> Bool -> Maybe FilePath -> [FilePath] -> IO PackageGraph
- depsGraphDeps :: Bool -> [String] -> Bool -> [String] -> [String] -> Bool -> Maybe FilePath -> [FilePath] -> [FilePath] -> IO PackageGraph
- data Components
- topsortGraph :: Components -> PackageGraph -> [[String]]
Documentation
type PackageGraph = Gr FilePath () Source #
alias for a package dependency graph
:: [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Create a directed dependency graph for a set of packages This is a convenience wrapper for createGraph1 False False True Nothing
:: [String] | rpmspec options |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Create a directed dependency graph for a set of packages setting rpm options
This is a convenience wrapper for createGraph2 rpmopts False False True Nothing
Since: 0.4.2
:: Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Create a directed dependency graph for a set of packages For the (createGraph default) reverse deps graph the arrows point back from the dependencies to the dependendent (parent/consumer) packages, and this allows forward sorting by dependencies (ie lowest deps first).
This is the same as createGraph2 []
Since: 0.4.6
:: [String] | rpmspec options |
-> Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Create a directed dependency graph for a set of packages For the (createGraph default) reverse deps graph the arrows point back from the dependencies to the dependendent (parent/consumer) packages, and this allows forward sorting by dependencies (ie lowest deps first).
Additionally this function allows passing options to rpmspec: eg `--with bootstrap` etc
Since: 0.4.6
:: [String] | ignored BuildRequires |
-> [String] | rpmspec options |
-> Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Create a directed dependency graph for a set of packages
Like createGraph2 but with additional parameter for any BRs to be ignored.
Since: 0.4.6
:: Bool | check for cycles |
-> [String] | ignored BuildRequires |
-> [String] | rpmspec options |
-> Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Create a directed dependency graph for a set of packages
Like createGraph3 but can disable check for cycles
Since: 0.4.6
:: Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Alias for createGraph1
deprecated
:: [String] | rpmspec options |
-> Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Alias for createGraph2
@since 0.4.2 (deprecated)
:: [String] | ignored BuildRequires |
-> [String] | rpmspec options |
-> Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Alias for createGraph3
@since 0.4.3 (deprecated)
:: Bool | check for cycles |
-> [String] | ignored BuildRequires |
-> [String] | rpmspec options |
-> Bool | verbose |
-> Bool | lenient (skip rpmspec failures) |
-> Bool | reverse dependency graph |
-> Maybe FilePath | look for spec file in a subdirectory |
-> [FilePath] | package paths (directories or spec filepaths) |
-> IO PackageGraph | dependency graph labelled by package paths |
Alias for createGraph4
@since 0.4.4 (deprecated)
:: [FilePath] | subset of packages to start from |
-> PackageGraph | dependency graph |
-> [FilePath] | dependencies of subset |
Get all of the dependencies of a subset of one or more packages within full PackageGraph. The subset paths should be written in the same way as for the graph.
packageLayers :: PackageGraph -> [[FilePath]] Source #
Return the bottom-up list of dependency layers of a graph
lowestLayer :: PackageGraph -> [FilePath] Source #
The lowest dependencies of a PackageGraph
lowestLayer' :: PackageGraph -> [LNode FilePath] Source #
The lowest dependency nodes of a PackageGraph
packageLeaves :: PackageGraph -> [FilePath] Source #
The leaf (outer) packages of a PackageGraph
separatePackages :: PackageGraph -> [FilePath] Source #
Returns packages independent of all the rest of the graph
printGraph :: PackageGraph -> IO () Source #
Return graphviz dot format of graph
renderGraph :: PackageGraph -> IO () Source #
Render graph with graphviz X11 preview
:: Bool | whether to look for reverse dependencies |
-> [String] | rpm options |
-> Bool | verbose output |
-> [String] | packages to exclude |
-> [String] | buildrequires to ignore |
-> Bool | allow rpmspec failures |
-> Maybe FilePath | subdir for packages |
-> [FilePath] | list of package paths |
-> IO PackageGraph | dependency graph of the packages |
Given a list of one or more packages, look for dependencies in neighboring packages and return a package dependency graph
Since: 0.4.9
:: Bool | whether to look for reverse dependencies |
-> [String] | rpm options |
-> Bool | verbose output |
-> [String] | packages to exclude |
-> [String] | buildrequires to ignore |
-> Bool | allow rpmspec failures |
-> Maybe FilePath | subdir for packages |
-> [FilePath] | list of package paths |
-> [FilePath] | list of potential dependency paths |
-> IO PackageGraph | dependency graph of the packages |
Given a list of one or more packages and a list of potential dependencies, return a package dependency graph
Since: 0.4.10
data Components Source #
Used to control the output from sortGraph
topsortGraph :: Components -> PackageGraph -> [[String]] Source #
topological sort packages from a PackageGraph arranged by Components
Since: 0.4.10