1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

guix gc: Add --references' and --referrers'.

* guix/scripts/gc.scm (show-help): Update.
  (%options): Add `--references' and `--referrers'.
  (guix-gc)[symlink-target, store-directory]: New procedures.
  Handle the `list-references' and `list-referrers' actions.
* tests/guix-gc.sh: Add tests for `--references'.
* doc/guix.texi (Invoking guix gc): Document `--references' and
  `--referrers'.
This commit is contained in:
Ludovic Courtès
2013-02-27 23:16:00 +01:00
parent fae31edcec
commit ba8b732d20
3 changed files with 73 additions and 7 deletions

View File

@@ -25,6 +25,18 @@ guix gc --version
trap "rm -f guix-gc-root" EXIT
rm -f guix-gc-root
# Check the references of a .drv.
drv="`guix build guile-bootstrap -d`"
out="`guix build guile-bootstrap`"
test -f "$drv" && test -d "$out"
guix gc --references "$drv" | grep -e -bash
guix gc --references "$out"
guix gc --references "$out/bin/guile"
if guix gc --references /dev/null;
then false; else true; fi
# Add then reclaim a .drv file.
drv="`guix build idutils -d`"
test -f "$drv"