guix package: Do not warn about "missing arguments" when there's nothing to do.

In some cases, running "guix upgrade" can trigger this warning, and
"missing arguments" is misleading then.

Reported by flatwhatson on #guix.

* guix/scripts/package.scm (process-actions): Change warning to "nothing
to do".
This commit is contained in:
Ludovic Courtès 2021-05-28 15:41:32 +02:00
parent b1ae0f30d8
commit f8c4437f0f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1045,7 +1045,12 @@ (define (transform-entry entry)
(warn-about-old-distro)
(when (and (null? files) (manifest-transaction-null? trans))
(warning (G_ "missing arguments, nothing to do~%")))
;; 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
;; "guix upgrade" on an up-to-date profile). We cannot distinguish
;; among these here; all we can say is that there's nothing to do.
(warning (G_ "nothing to do~%")))
(unless (manifest-transaction-null? trans)
;; When '--manifest' is used, display information about TRANS as if we