[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#41260] [PATCH 1/1] guix package: Support multiple profiles with '--
From: |
Ludovic Courtès |
Subject: |
[bug#41260] [PATCH 1/1] guix package: Support multiple profiles with '--list-installed'. |
Date: |
Sat, 16 May 2020 19:33:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi!
zimoun <address@hidden> 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’.
[bug#41260] [PATCH v2] guix package: Support multiple profiles with '--list-installed'., zimoun, 2020/05/21