summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-06-13 23:46:17 +0200
committerLudovic Courtès <ludo@gnu.org>2021-06-13 23:57:45 +0200
commit0294cfc25a6a8d8cbe4374b3df01ae7acd39263f (patch)
treea5f793653b28dbc072df4b52d8a1a1aadd0f231a /guix/scripts
parentd06cec625d1cca398cde8a27c227358aaa28eca6 (diff)
guix package: Do not say "nothing to do" upon rollback & co.
Previously, "guix package --switch-generations=4" or similar would print "nothing to do". * guix/scripts/package.scm (process-actions): Do not warn about "nothing to do" when one of %ACTIONS is requested.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/package.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 6db83807af..694959d326 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -1044,7 +1044,10 @@ processed, #f otherwise."
(warn-about-old-distro)
- (when (and (null? files) (manifest-transaction-null? trans))
+ (when (and (null? files) (manifest-transaction-null? trans)
+ (not (any (match-lambda
+ ((key . _) (assoc-ref %actions key)))
+ opts)))
;; We can reach this point because the user did not specify any action
;; (as in "guix package"), did not specify any package (as in "guix
;; install"), or because there's nothing to upgrade (as when running