rpmbuild-order-0.4.12: Sort RPM packages in dependency order
Safe HaskellSafe-Inferred
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 createGraph1 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 createGraph2 rpmopts False False True Nothing

Since: 0.4.2

createGraph1 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 createGraph2 []

Since: 0.4.6

createGraph2 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.6

createGraph3 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 createGraph2 but with additional parameter for any BRs to be ignored.

Since: 0.4.6

createGraph4 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 createGraph3 but can disable check for cycles

Since: 0.4.6

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

Alias for createGraph1

deprecated

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

Alias for createGraph2

@since 0.4.2 (deprecated)

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

Alias for createGraph3

@since 0.4.3 (deprecated)

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

Alias for createGraph4

@since 0.4.4 (deprecated)

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

depsGraph Source #

Arguments

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

depsGraphDeps Source #

Arguments

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

Constructors

Parallel

separate independent stacks

Combine

combine indepdendent stacks together

Connected

only stack of packages

Separate

only independent packages in the package set

topsortGraph :: Components -> PackageGraph -> [[String]] Source #

topological sort packages from a PackageGraph arranged by Components

Since: 0.4.10