GNU bug report logs - #41260
[PATCH 0/1] Support multiple profiles with '--list-installed'.

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Thu, 14 May 2020 14:15:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 41260 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 41260 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 1/1] guix package: Support multiple profiles with
 '--list-installed'.
Date: Thu, 14 May 2020 16:17:59 +0200
* guix/scripts/package.scm (process-query): List installed multiple profiles.
---
 guix/scripts/package.scm | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index a69efa365e..a4a6100a33 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -717,20 +717,23 @@ processed, #f otherwise."
        #t)
 
       (('list-installed regexp)
-       (let* ((regexp    (and regexp (make-regexp* regexp regexp/icase)))
-              (manifest  (profile-manifest profile))
-              (installed (manifest-entries manifest)))
-         (leave-on-EPIPE
-          (for-each (match-lambda
-                      (($ <manifest-entry> name version output path _)
-                       (when (or (not regexp)
-                                 (regexp-exec regexp name))
-                         (format #t "~a\t~a\t~a\t~a~%"
-                                 name (or version "?") output path))))
-
-                    ;; Show most recently installed packages last.
-                    (reverse installed)))
-         #t))
+       (for-each
+        (lambda (profile)
+          (let* ((regexp    (and regexp (make-regexp* regexp regexp/icase)))
+                 (manifest  (profile-manifest profile))
+                 (installed (manifest-entries manifest)))
+            (leave-on-EPIPE
+             (for-each (match-lambda
+                         (($ <manifest-entry> name version output path _)
+                          (when (or (not regexp)
+                                    (regexp-exec regexp name))
+                            (format #t "~a\t~a\t~a\t~a~%"
+                                    name (or version "?") output path))))
+
+                       ;; Show most recently installed packages last.
+                       (reverse installed)))))
+        profiles)
+       #t)
 
       (('list-available regexp)
        (let* ((regexp    (and regexp (make-regexp* regexp regexp/icase)))
-- 
2.26.1





This bug report was last modified 5 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.