mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
profiles: Add 'profile-generations'.
* guix/profiles.scm (profile-generations): New procedure.
This commit is contained in:
parent
de1c158f32
commit
f452e8ff10
1 changed files with 8 additions and 0 deletions
|
@ -70,6 +70,7 @@ (define-module (guix profiles)
|
|||
profile-derivation
|
||||
generation-number
|
||||
generation-numbers
|
||||
profile-generations
|
||||
previous-generation-number
|
||||
generation-time
|
||||
generation-file-name))
|
||||
|
@ -561,6 +562,13 @@ (define (error name* stat errno result)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue