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.
This commit is contained in:
Ludovic Courtès 2021-06-13 23:46:17 +02:00
parent d06cec625d
commit 0294cfc25a
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1044,7 +1044,10 @@ (define (transform-entry entry)
(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