瀏覽代碼

profiles: Add 'profile-generations'.

* guix/profiles.scm (profile-generations): New procedure.
gn-latest-20200428
Alex Kost 6 年之前
父節點
當前提交
f452e8ff10
共有 1 個檔案被更改,包括 8 行新增0 行删除
  1. +8
    -0
      guix/profiles.scm

+ 8
- 0
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


Loading…
取消
儲存