summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-01 15:51:47 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-01 16:38:30 +0200
commit6d1a5e5ffdbb7d15ffad7918213d96ee8c6e9164 (patch)
tree885032e6d249516082843cd3c3073329d25e891c /guix/scripts
parentf4322542378e010c41c267d62300b6ebbdb01fe4 (diff)
refresh: Report packages using the "@" syntax.
* guix/scripts/refresh.scm (list-dependents)[full-name]: New procedure. Use 'full-name' instead of 'package-full-name'. * doc/guix.texi (Invoking guix refresh): Adjust example accordingly.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/refresh.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 4d3c695aaf..c0d589af17 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
@@ -315,6 +315,10 @@ WARN? is true and no updater exists for PACKAGE, print a warning."
"List all the things that would need to be rebuilt if PACKAGES are changed."
;; Using %BAG-NODE-TYPE is more accurate than using %PACKAGE-NODE-TYPE
;; because it includes implicit dependencies.
+ (define (full-name package)
+ (string-append (package-name package) "@"
+ (package-version package)))
+
(mlet %store-monad ((edges (node-back-edges %bag-node-type
(all-packages))))
(let* ((dependents (node-transitive-edges packages edges))
@@ -327,12 +331,12 @@ WARN? is true and no updater exists for PACKAGE, print a warning."
(N_ "No dependents other than itself: ~{~a~}~%"
"No dependents other than themselves: ~{~a~^ ~}~%"
(length packages))
- (map package-full-name packages)))
+ (map full-name packages)))
((x)
(format (current-output-port)
(_ "A single dependent package: ~a~%")
- (package-full-name x)))
+ (full-name x)))
(lst
(format (current-output-port)
(N_ "Building the following package would ensure ~d \
@@ -341,7 +345,7 @@ dependent packages are rebuilt: ~*~{~a~^ ~}~%"
dependent packages are rebuilt: ~{~a~^ ~}~%"
(length covering))
(length covering) (length dependents)
- (map package-full-name covering))))
+ (map full-name covering))))
(return #t))))