guix package: Use 'profile-generations'.
* guix/scripts/package.scm (guix-package)[process-actions]: Use 'profile-generations' instead of the equivalent code.
This commit is contained in:
parent
f452e8ff10
commit
886cf584db
|
@ -716,12 +716,9 @@ more information.~%"))
|
||||||
(leave (_ "profile '~a' does not exist~%")
|
(leave (_ "profile '~a' does not exist~%")
|
||||||
profile))
|
profile))
|
||||||
((string-null? pattern)
|
((string-null? pattern)
|
||||||
(let ((numbers (generation-numbers profile)))
|
(for-each display-and-delete
|
||||||
(if (equal? numbers '(0))
|
(delete current-generation-number
|
||||||
(exit 0)
|
(profile-generations profile))))
|
||||||
(for-each display-and-delete
|
|
||||||
(delete current-generation-number
|
|
||||||
numbers)))))
|
|
||||||
;; Do not delete the zeroth generation.
|
;; Do not delete the zeroth generation.
|
||||||
((equal? 0 (string->number pattern))
|
((equal? 0 (string->number pattern))
|
||||||
(exit 0))
|
(exit 0))
|
||||||
|
@ -828,11 +825,7 @@ more information.~%"))
|
||||||
(leave (_ "profile '~a' does not exist~%")
|
(leave (_ "profile '~a' does not exist~%")
|
||||||
profile))
|
profile))
|
||||||
((string-null? pattern)
|
((string-null? pattern)
|
||||||
(let ((numbers (generation-numbers profile)))
|
(for-each list-generation (profile-generations profile)))
|
||||||
(leave-on-EPIPE
|
|
||||||
(if (equal? numbers '(0))
|
|
||||||
(exit 0)
|
|
||||||
(for-each list-generation numbers)))))
|
|
||||||
((matching-generations pattern profile)
|
((matching-generations pattern profile)
|
||||||
=>
|
=>
|
||||||
(lambda (numbers)
|
(lambda (numbers)
|
||||||
|
|
Loading…
Reference in New Issue