From d7ddb257c9d22c794d6b26af64a57901ccee71e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 27 Sep 2013 01:17:01 +0200 Subject: 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'. --- tests/guix-package.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') 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. # -- cgit v1.2.3