diff options
author | Alex Kost <alezost@gmail.com> | 2014-09-21 14:24:09 +0400 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-09-22 13:24:52 +0400 |
commit | f452e8ff10a5ae0e9592a1f7731d198d204c8f69 (patch) | |
tree | 52642448ba76b1b5c05078b95f0adbac4273811c | |
parent | de1c158f32e1d4060daa600a62b68fe22b613424 (diff) | |
download | guix-f452e8ff10a5ae0e9592a1f7731d198d204c8f69.tar.gz |
profiles: Add 'profile-generations'.
* guix/profiles.scm (profile-generations): New procedure.
-rw-r--r-- | guix/profiles.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm index aa88b849e1..18733a6664 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -70,6 +70,7 @@ profile-derivation generation-number generation-numbers + profile-generations previous-generation-number generation-time generation-file-name)) @@ -561,6 +562,13 @@ former profiles were found." profiles) <)))) +(define (profile-generations profile) + "Return a list of PROFILE's generations." + (let ((generations (generation-numbers profile))) + (if (equal? generations '(0)) + '() + generations))) + (define (previous-generation-number profile number) "Return the number of the generation before generation NUMBER of PROFILE, or 0 if none exists. It could be NUMBER - 1, but it's not the |