me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2017-05-01 15:51:47 +02:00
parent f432254237
commit 6d1a5e5ffd
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 9 additions and 5 deletions

View File

@ -5852,7 +5852,7 @@ an upgrade. More rebuilds might be required under some circumstances.
@example @example
$ guix refresh --list-dependent flex $ guix refresh --list-dependent flex
Building the following 120 packages would ensure 213 dependent packages are rebuilt: Building the following 120 packages would ensure 213 dependent packages are rebuilt:
hop-2.4.0 geiser-0.4 notmuch-0.18 mu-0.9.9.5 cflow-1.4 idutils-4.6 @dots{} hop@@2.4.0 geiser@@0.4 notmuch@@0.18 mu@@0.9.9.5 cflow@@1.4 idutils@@4.6 @dots{}
@end example @end example
The command above lists a set of packages that could be built to check The command above lists a set of packages that could be built to check

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; 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 © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com> ;;; 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." "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 ;; Using %BAG-NODE-TYPE is more accurate than using %PACKAGE-NODE-TYPE
;; because it includes implicit dependencies. ;; 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 (mlet %store-monad ((edges (node-back-edges %bag-node-type
(all-packages)))) (all-packages))))
(let* ((dependents (node-transitive-edges packages edges)) (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~}~%" (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 full-name packages)))
((x) ((x)
(format (current-output-port) (format (current-output-port)
(_ "A single dependent package: ~a~%") (_ "A single dependent package: ~a~%")
(package-full-name x))) (full-name x)))
(lst (lst
(format (current-output-port) (format (current-output-port)
(N_ "Building the following package would ensure ~d \ (N_ "Building the following package would ensure ~d \
@ -341,7 +345,7 @@ dependent packages are rebuilt: ~*~{~a~^ ~}~%"
dependent packages are rebuilt: ~{~a~^ ~}~%" dependent packages are rebuilt: ~{~a~^ ~}~%"
(length covering)) (length covering))
(length covering) (length dependents) (length covering) (length dependents)
(map package-full-name covering)))) (map full-name covering))))
(return #t)))) (return #t))))