[arch-haskell] Topological Build Queue Script
xyne at archlinux.ca
Sat Oct 12 07:37:02 UTC 2013
> I've written a script (in Haskell) that accepts package names on the command
> line and returns a topologically-sorted list of those packages and all others
> that depend on them, directly or indirectly.
> The script parses the output of "pacman -Qi", specifically the "Required By"
> field, to generate the directed dependency graph. The subgraph of that graph
> that is reachable from the specified packages is then passed to
> Data.Graph.topSort to generate the list.
> I have assumed that the "Required By" field is complete and that it correctly
> displays relationships for packages that depend on "provided" packages.
> Because the script parses "pacman -Qi", all of the packages must be installed.
> It would also work for "pacman -Si" and it can be easily extended later to
> handle other input such as formatted data from .cabal files or custom output
> from cabal2arch.
> The could could also be adapted for extracting other information from Pacman.
> You can find it under the name "topac" here:
Rémy Oudompheng wrote:
> Basic functions that output a topologically sorted list of package
> names, that is the order in which packages are meant to be built
> according to dependencies, are now implemented.
It seems I've re-invented the wheel yet again. :/
More information about the arch-haskell