rpmbuild-order-0.4.3.2: Order RPM packages by dependencies
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

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