emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#54454: closed ([PATCH] ui: Describe package outputs.)


From: GNU bug Tracking System
Subject: bug#54454: closed ([PATCH] ui: Describe package outputs.)
Date: Tue, 16 Aug 2022 19:38:02 +0000

Your message dated Tue, 16 Aug 2022 21:37:46 +0200
with message-id <19b47f93f45d15a366f3ec59ea8a6fa17b99d023.camel@gmail.com>
and subject line Re: [PATCH v2] ui: Describe package outputs.
has caused the debbugs.gnu.org bug report #54454,
regarding [PATCH] ui: Describe package outputs.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
54454: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54454
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] ui: Describe package outputs. Date: Fri, 18 Mar 2022 20:16:39 +0100
* guix/ui.scm (package->recutils): Output outputs with their descriptions,
one per line.
---
Salut Guix,

People have been complaining for a while, that outputs are not really
discoverable [who?].  This patch attempts to fix that by displaying each
on their own line with a (hopefully) helpful description next to it.
It is expected, that these descriptions do not span multiple lines.

Cheers

 guix/ui.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 6c194eb3c9..dfa90126bc 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1543,13 +1544,33 @@ (define (dependencies->recutils packages)
                                    (sort packages package<?))) " ")))
       (split-lines list (string-length "dependencies: "))))
 
+  (define (output->recutils package output)
+    (let ((descs (assq-ref (package-properties package) 'output-descriptions)))
+      (string-append
+       "+ " output ": "
+       (or
+        (assoc-ref descs output)
+        (assoc-ref `(("bin" . ,(G_ "executable programs and scripts."))
+                     ("debug" . ,(G_ "debug information."))
+                     ("lib" . ,(G_ "shared libraries."))
+                     ("static" . ,(G_ "static libraries."))
+                     ("out" . ,(G_ "everything else.")))
+                   output)
+        (G_ "state secrets.")))))
+
+  (define (package-outputs/out-last package)
+    ((compose append partition)
+     (negate (cut string=? "out" <>))
+     (package-outputs package)))
+
   (define (package<? p1 p2)
     (string<? (package-full-name p1) (package-full-name p2)))
 
   ;; Note: Don't i18n field names so that people can post-process it.
   (format port "name: ~a~%" (package-name p))
   (format port "version: ~a~%" (package-version p))
-  (format port "outputs: ~a~%" (string-join (package-outputs p)))
+  (format port "outputs:~%~{~a~%~}"
+          (map (cut output->recutils p <>) (package-outputs/out-last p)))
   (format port "systems: ~a~%"
           (split-lines (string-join (package-transitive-supported-systems p))
                        (string-length "systems: ")))
-- 
2.34.0




--- End Message ---
--- Begin Message --- Subject: Re: [PATCH v2] ui: Describe package outputs. Date: Tue, 16 Aug 2022 21:37:46 +0200 User-agent: Evolution 3.42.1
Am Sonntag, dem 26.06.2022 um 14:37 +0200 schrieb Liliana Marie
Prikler:
> * guix/ui.scm (package->recutils): Output outputs with their
> descriptions,
> one per line.
> * po/packages/Makevars (XGETTEXT_OPTIONS): Add ‘output-synopsis’ as
> keyword.
I pushed this now.

Cheers


--- End Message ---

reply via email to

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