aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-27 01:17:01 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-27 01:23:59 +0200
commitd7ddb257c9d22c794d6b26af64a57901ccee71e0 (patch)
treeecd2d88571ed6c7477163d8cfd034a1b0c2b4192 /tests
parent03f4ef28b17ef2b53eb56dbd3fa382569677490b (diff)
downloadgnu-guix-d7ddb257c9d22c794d6b26af64a57901ccee71e0.tar
gnu-guix-d7ddb257c9d22c794d6b26af64a57901ccee71e0.tar.gz
guix package: '--delete-generations' deletes generations older than specified.
* guix/scripts/package.scm (matching-generations): Add 'duration-relation' keyword parameter. (guix-package)[process-action](delete-generations): Pass #:duration-relation >. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix package): Clarify the meaning of durations for '--list-durations' and '--delete-durations'.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 80301f63cc..9116f352c9 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -168,6 +168,13 @@ then false; else true; fi
# Check whether `--list-available' returns something sensible.
guix package -p "$profile" -A 'gui.*e' | grep guile
+# There's no generation older than 12 months, so the following command should
+# have no effect.
+generation="`readlink_base "$profile"`"
+if guix package -p "$profile" --delete-generations=12m;
+then false; else true; fi
+test "`readlink_base "$profile"`" = "$generation"
+
#
# Try with the default profile.
#