refresh: Avoid non-literal format string.

Reported by Mathieu Lirzin <mthl@gnu.org>.

* guix/scripts/refresh.scm (guix-refresh): Rewrite 'list-dependent?'
  report to avoid nested 'N_' calls.
This commit is contained in:
Ludovic Courtès 2015-11-11 22:09:27 +01:00
parent 42f8504ccc
commit 14649b8cdb
1 changed files with 17 additions and 13 deletions

View File

@ -322,21 +322,25 @@ update would trigger a complete rebuild."
(package-covering-dependents packages))) (package-covering-dependents packages)))
(total-dependents (total-dependents
(length (package-transitive-dependents packages)))) (length (package-transitive-dependents packages))))
(if (= total-dependents 0) (cond ((= total-dependents 0)
(format (current-output-port) (format (current-output-port)
(N_ "No dependents other than itself: ~{~a~}~%" (N_ "No dependents other than itself: ~{~a~}~%"
"No dependents other than themselves: ~{~a~^ ~}~%" "No dependents other than themselves: ~{~a~^ ~}~%"
(length packages)) (length packages))
(map package-full-name packages)) (map package-full-name packages)))
(format (current-output-port)
(N_ (N_ "A single dependent package: ~2*~{~a~}~%" ((= total-dependents 1)
"Building the following package would ensure ~d \ (format (current-output-port)
dependent packages are rebuilt; ~*~{~a~^ ~}~%" (_ "A single dependent package: ~{~a~}~%")
total-dependents) rebuilds))
"Building the following ~d packages would ensure ~d \ (else
(format (current-output-port)
(N_ "Building the following package would ensure ~d \
dependent packages are rebuilt: ~*~{~a~^ ~}~%"
"Building the following ~d packages would ensure ~d \
dependent packages are rebuilt: ~{~a~^ ~}~%" dependent packages are rebuilt: ~{~a~^ ~}~%"
(length rebuilds)) (length rebuilds))
(length rebuilds) total-dependents rebuilds)))) (length rebuilds) total-dependents rebuilds)))))
(update? (update?
(let ((store (open-connection))) (let ((store (open-connection)))
(parameterize ((%openpgp-key-server (parameterize ((%openpgp-key-server