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


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 41260 <at> debbugs.gnu.org
Subject: [bug#41260] [PATCH 1/1] guix package: Support multiple profiles with '--list-installed'.
Date: Sat, 16 May 2020 19:33:58 +0200
Hi!

zimoun <zimon.toutoune <at> gmail.com> skribis:

> * guix/scripts/package.scm (process-query): List installed multiple profiles.

[...]

> +       (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)

How about instead loading all the manifests, merging them with
‘concatenate-manifests’, and operating on that?  That would avoid
special-casing.

Bonus point if you can add a test case for that, similar to
‘--search-paths’ with multiple profiles.  :-)

Thanks,
Ludo’.




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.