summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-07-12 01:03:53 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-07-12 01:03:53 +0200
commitfb9a23a3f3ad3d7b5b7f03b2007baf27684d6bbd (patch)
treeafbd3f4f33771c61254b0c3d977092542fbe8009 /guix/scripts/package.scm
parent1c4b72cb34640638e40c5190676e5c8c352d292d (diff)
parent5a836ce38c9c29e9c2bd306007347486b90c5064 (diff)
downloadguix-patches-fb9a23a3f3ad3d7b5b7f03b2007baf27684d6bbd.tar
guix-patches-fb9a23a3f3ad3d7b5b7f03b2007baf27684d6bbd.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/local.mk gnu/packages/python-xyz.scm gnu/packages/xml.scm guix/gexp.scm po/guix/POTFILES.in
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm17
1 files changed, 6 insertions, 11 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 7b277b63f1..a43c96516f 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -98,7 +98,7 @@ denote ranges as interpreted by 'matching-generations'."
(cond ((not (file-exists? profile)) ; XXX: race condition
(raise (condition (&profile-not-found-error
(profile profile)))))
- ((string-null? pattern)
+ ((not pattern)
(delete-generations store profile
(delv current (profile-generations profile))))
;; Do not delete the zeroth generation.
@@ -120,9 +120,7 @@ denote ranges as interpreted by 'matching-generations'."
(let ((numbers (delv current numbers)))
(when (null-list? numbers)
(leave (G_ "no matching generation~%")))
- (delete-generations store profile numbers))))
- (else
- (leave (G_ "invalid syntax: ~a~%") pattern)))))
+ (delete-generations store profile numbers)))))))
(define* (build-and-use-profile store profile manifest
#:key
@@ -457,12 +455,12 @@ command-line option~%")
arg-handler)))
(option '(#\l "list-generations") #f #t
(lambda (opt name arg result arg-handler)
- (values (cons `(query list-generations ,(or arg ""))
+ (values (cons `(query list-generations ,arg)
result)
#f)))
(option '(#\d "delete-generations") #f #t
(lambda (opt name arg result arg-handler)
- (values (alist-cons 'delete-generations (or arg "")
+ (values (alist-cons 'delete-generations arg
result)
#f)))
(option '(#\S "switch-generation") #t #f
@@ -683,7 +681,7 @@ processed, #f otherwise."
(cond ((not (file-exists? profile)) ; XXX: race condition
(raise (condition (&profile-not-found-error
(profile profile)))))
- ((string-null? pattern)
+ ((not pattern)
(match (profile-generations profile)
(()
#t)
@@ -697,10 +695,7 @@ processed, #f otherwise."
(exit 1)
(begin
(list-generation display-profile-content (car numbers))
- (diff-profiles profile numbers)))))
- (else
- (leave (G_ "invalid syntax: ~a~%")
- pattern))))
+ (diff-profiles profile numbers)))))))
#t)
(('list-installed regexp)