diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-04-02 15:44:42 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-04-02 16:07:40 +0200 |
commit | d2952326ae18f50f6b3abefe0b12547556f9a1b8 (patch) | |
tree | 45928db066d891ee86fb5796497bc5d3f2c4cf01 /tests | |
parent | 0d55c3563c963f457cc67a728b937a67302ca731 (diff) | |
download | patches-d2952326ae18f50f6b3abefe0b12547556f9a1b8.tar patches-d2952326ae18f50f6b3abefe0b12547556f9a1b8.tar.gz |
guix package: Register non-default profiles as GC roots.
* guix/scripts/package.scm (maybe-register-gc-root): New procedure.
* tests/guix-package.sh (profile): Grep the output of "guix gc
--list-live" in a couple of places.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-package.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 253a9317a6..3fd65a2e1a 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -41,6 +41,9 @@ guix package --bootstrap -p "$profile" -i guile-bootstrap test -L "$profile" && test -L "$profile-1-link" test -f "$profile/bin/guile" +# Make sure the profile is a GC root. +guix gc --list-live | grep "`readlink "$profile-1-link"`" + # Installing the same package a second time does nothing. guix package --bootstrap -p "$profile" -i guile-bootstrap test -L "$profile" && test -L "$profile-1-link" @@ -209,6 +212,10 @@ fi default_profile="`readlink "$HOME/.guix-profile"`" for i in `seq 1 3` do + # Make sure the current generation is a GC root. + profile_link="`readlink "$default_profile"`" + guix gc --list-live | grep "`readlink "$profile_link"`" + guix package --bootstrap --roll-back ! test -f "$HOME/.guix-profile/bin" ! test -f "$HOME/.guix-profile/lib" |