WIP Rust based rebuild order generation script (read-only mirror)
Go to file
Jelle van der Waa ee6b92cd82
Update cargo dependencies
Resolves tar vulnerability.
2021-12-29 20:19:40 +01:00
doc Fix typo in "pn" in man page 2021-01-23 21:06:21 +01:00
src Fix clippy warning about useless borrows 2021-08-02 20:50:49 +02:00
tests Add a test for multiple inputs 2021-04-27 18:46:39 +02:00
.gitignore Add a man page 2021-01-08 00:08:55 +01:00
.gitlab-ci.yml Add pkg-config for cargo clippy step 2021-12-29 20:11:43 +01:00
Cargo.lock Update cargo dependencies 2021-12-29 20:19:40 +01:00
Cargo.toml Update Rust version to 2021 2021-12-29 20:08:43 +01:00
LICENSE Add MIT License file 2020-08-22 01:21:08 +02:00
Makefile Add a separate completion generation 2021-01-10 23:51:33 +01:00
README.md Update README with opencolorio1 as example pkg 2021-04-30 23:11:44 +02:00

README.md

Arch Linux Rebuild Order Tool

A CLI tool to determine the rebuild order of provided package(s).

Usage

To show the rebuild order of opencolorio1

cargo run opencolorio1

Requirements

  • Generate a list of packages to rebuild in order for given package(s).
  • Generate the build order within one second.

Algorithm

Arch-rebuild-order uses the local syncdb to build a hashmap, mapping packages to their reverse (make) dependencies. The provided pkgnames are looked up in the syncdb and a hashmap is built of the package provides and the pkgname called provides_map. The pkgnames and provides are added to the to_visit list and this then starts the iteration over every entry in the list. During each iteration, the real package name is resolved if the provided package comes from provides using the provides_map, a graph node is created for the entry. For all reverse (make) dependencies of the entry, the dependency is added to the to_visit list, a new graph node is created and added as an edge of the pkg node. This repeats until the to_visit list is empty.

DOT output

Arch-rebuild-order can generate a DOT file of the rebuild order for a given package.

cargo run -- -d opencolorio.dot opencolorio1
dot -Tpng opencolorio.dot > opencolorio.png

Limitations

  • testing and community-testing repositories are not included.
  • Arch-rebuild-order expects an up-to-date syncdb and does not provide warning if it is not.

Completions

Shell completions can be created with cargo run --bin completions in a directory specified by the env variable OUT_DIR.