guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: refresh: Report packages using the "@" syntax.


From: Ludovic Courtès
Subject: 01/04: refresh: Report packages using the "@" syntax.
Date: Mon, 1 May 2017 11:31:05 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 6d1a5e5ffdbb7d15ffad7918213d96ee8c6e9164
Author: Ludovic Courtès <address@hidden>
Date:   Mon May 1 15:51:47 2017 +0200

    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.
---
 doc/guix.texi            |  2 +-
 guix/scripts/refresh.scm | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 957ce2b..9f63413 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5852,7 +5852,7 @@ an upgrade.  More rebuilds might be required under some 
circumstances.
 @example
 $ guix refresh --list-dependent flex
 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
 
 The command above lists a set of packages that could be built to check
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 4d3c695..c0d589a 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 <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2013 Nikita Karetnikov <address@hidden>
 ;;; Copyright © 2014 Eric Bavier <address@hidden>
 ;;; Copyright © 2015 Alex Kost <address@hidden>
@@ -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))))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]