rpmbuild-order-0.4.4.1: Sort RPM packages in dependency order
Safe HaskellNone
LanguageHaskell2010

Distribution.RPM.Build.Graph

Description

This module provides simple dependency graph making for rpm packages:

import Distribution.RPM.Build.Graph

graph <- createGraph ["pkg1", "pkg2", "../pkg3"]
Synopsis

Documentation

type PackageGraph = Gr FilePath () Source #

alias for a package dependency graph

createGraph Source #

Arguments

:: [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 createGraph' False False True Nothing

createGraphRpmOpts Source #

Arguments

:: [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 createGraph'' rpmopts False False True Nothing

Since: 0.4.2

createGraph' Source #

Arguments

:: 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 createGraph'' []

createGraph'' Source #

Arguments

:: [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.2

createGraph''' Source #

Arguments

:: [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 createGraph'' but with additional parameter for any BRs to be ignored.

Since: 0.4.3

createGraph'''' Source #

Arguments

:: 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 createGraph''' but can disable check for cycles

Since: 0.4.4

dependencyNodes Source #

Arguments

:: [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.

subgraph' :: Gr a b -> [Node] -> Gr a b Source #

A flipped version of subgraph

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