aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-09-21 14:25:56 +0400
committerAlex Kost <alezost@gmail.com>2014-09-22 13:24:52 +0400
commit886cf584db46eda53b86053cf944649ff2ad23de (patch)
tree92d48c8f6f084bbf19457e2c9ae60a5f5e75bdda /guix/scripts
parentf452e8ff10a5ae0e9592a1f7731d198d204c8f69 (diff)
downloadgnu-guix-886cf584db46eda53b86053cf944649ff2ad23de.tar
gnu-guix-886cf584db46eda53b86053cf944649ff2ad23de.tar.gz
guix package: Use 'profile-generations'.
* guix/scripts/package.scm (guix-package)[process-actions]: Use 'profile-generations' instead of the equivalent code.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/package.scm15
1 files changed, 4 insertions, 11 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 95c0130c95..7cd95167d2 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -716,12 +716,9 @@ more information.~%"))
(leave (_ "profile '~a' does not exist~%")
profile))
((string-null? pattern)
- (let ((numbers (generation-numbers profile)))
- (if (equal? numbers '(0))
- (exit 0)
- (for-each display-and-delete
- (delete current-generation-number
- numbers)))))
+ (for-each display-and-delete
+ (delete current-generation-number
+ (profile-generations profile))))
;; Do not delete the zeroth generation.
((equal? 0 (string->number pattern))
(exit 0))
@@ -828,11 +825,7 @@ more information.~%"))
(leave (_ "profile '~a' does not exist~%")
profile))
((string-null? pattern)
- (let ((numbers (generation-numbers profile)))
- (leave-on-EPIPE
- (if (equal? numbers '(0))
- (exit 0)
- (for-each list-generation numbers)))))
+ (for-each list-generation (profile-generations profile)))
((matching-generations pattern profile)
=>
(lambda (numbers)