| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | guix gc --version
|
| 24 |
|
| 25 | trap "rm -f guix-gc-root" EXIT
|
| 26 | rm -f guix-gc-root
|
| 27 |
|
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | unset drv
|
| 34 | unset out
|
| 35 |
|
| 36 | |
| 37 | for option in "" "-C 500M" "--verify" "--optimize" "--list-roots"
|
| 38 | do
|
| 39 | guix gc $option whatever && false
|
| 40 | done
|
| 41 |
|
| 42 | |
| 43 | guix gc --verify=foo && false
|
| 44 |
|
| 45 | |
| 46 | drv="`guix build guile-bootstrap -d`"
|
| 47 | out="`guix build guile-bootstrap`"
|
| 48 | test -f "$drv" && test -d "$out"
|
| 49 |
|
| 50 | guix gc --references "$drv" | grep -e -bash
|
| 51 | guix gc --references "$out"
|
| 52 | guix gc --references "$out/bin/guile"
|
| 53 |
|
| 54 | guix gc --references /dev/null && false
|
| 55 |
|
| 56 | |
| 57 | guix gc --derivers "$out" | grep "$drv"
|
| 58 |
|
| 59 | |
| 60 | drv="`guix build idutils -d`"
|
| 61 | test -f "$drv"
|
| 62 |
|
| 63 | guix gc --list-dead | grep "$drv"
|
| 64 | guix gc --delete "$drv"
|
| 65 | test ! -f "$drv"
|
| 66 |
|
| 67 | |
| 68 | drv="`guix build --root=guix-gc-root hello -d`"
|
| 69 | test -f "$drv" && test -L guix-gc-root
|
| 70 |
|
| 71 | guix gc --list-roots | grep "$PWD/guix-gc-root"
|
| 72 |
|
| 73 | guix gc --list-live | grep "$drv"
|
| 74 | guix gc --delete "$drv" && false
|
| 75 |
|
| 76 | rm guix-gc-root
|
| 77 | guix gc --list-dead | grep "$drv"
|
| 78 | guix gc --delete "$drv"
|
| 79 | test ! -f "$drv"
|
| 80 |
|
| 81 | |
| 82 | guix gc -C 1KiB
|
| 83 |
|
| 84 | |
| 85 | guix gc --delete /dev/null && false
|
| 86 |
|
| 87 | |
| 88 | out="`guix build guile-bootstrap`"
|
| 89 | test -d "$out"
|
| 90 |
|
| 91 | guix gc --delete "$out"
|
| 92 |
|
| 93 | test ! -d "$out"
|
| 94 |
|
| 95 | out="`guix build guile-bootstrap`"
|
| 96 | test -d "$out"
|
| 97 |
|
| 98 | guix gc --delete "$out/"
|
| 99 |
|
| 100 | test ! -d "$out"
|
| 101 |
|
| 102 | out="`guix build guile-bootstrap`"
|
| 103 | test -d "$out"
|
| 104 |
|
| 105 | guix gc --delete "$out/bin/guile"
|