From patchwork Fri Mar 18 19:16:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 37929 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C10B127BBEA; Fri, 18 Mar 2022 19:37:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, PP_MIME_FAKE_ASCII_TEXT,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 21F2627BBE9 for ; Fri, 18 Mar 2022 19:37:13 +0000 (GMT) Received: from localhost ([::1]:51648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVIPQ-00071S-8O for patchwork@mira.cbaines.net; Fri, 18 Mar 2022 15:37:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVIPG-0006zW-6U for guix-patches@gnu.org; Fri, 18 Mar 2022 15:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVIPF-0004rk-Tr for guix-patches@gnu.org; Fri, 18 Mar 2022 15:37:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVIPF-0000li-SC for guix-patches@gnu.org; Fri, 18 Mar 2022 15:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54454] [PATCH] ui: Describe package outputs. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Mar 2022 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54454 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54454@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16476321642865 (code B ref -1); Fri, 18 Mar 2022 19:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Mar 2022 19:36:04 +0000 Received: from localhost ([127.0.0.1]:58431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVIOK-0000k8-2W for submit@debbugs.gnu.org; Fri, 18 Mar 2022 15:36:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:56364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVIOI-0000jx-CT for submit@debbugs.gnu.org; Fri, 18 Mar 2022 15:36:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVIOI-0006Kd-6i for guix-patches@gnu.org; Fri, 18 Mar 2022 15:36:02 -0400 Received: from [2a00:1450:4864:20::642] (port=46682 helo=mail-ej1-x642.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVIOG-0004hz-IC for guix-patches@gnu.org; Fri, 18 Mar 2022 15:36:01 -0400 Received: by mail-ej1-x642.google.com with SMTP id qx21so18850621ejb.13 for ; Fri, 18 Mar 2022 12:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:content-transfer-encoding:message-id :mime-version; bh=V8dXs04r7IlkuLNSf0Fx5Ljt2kgAGdJguY4DnUtJ/b8=; b=JmDLen5f0WqXrPDhGfb4ydsnde4moN7MWA6YbcVeNizmqKhcP0EchMp8Y1eeI9oC2E VLzn4b5i06bEpdO/L7wJbAIXHJmJASdQt2gPaxQfU68V15A4ZdfeX6b7RUcM+nbZr8Py we5YrqTUT9OT0o9LIFH7TyFvK87Px3fx3beGDtakvXut7oQi7Mqhm0AKZetw3e7cUuk7 b4bM+DzKWihnmNMLGfJoMXY36RpGowbmw/E8o7bDx1w0WaZ5Xx+eJy4Qlmpqhoj/sg1v oeQLkxHwCrXj18+gfj+xB2SwYjmDueB3zl0+4bDHNavD61maJ1Z04NxN+JQIxSNjMDoq Gqgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:content-transfer-encoding :message-id:mime-version; bh=V8dXs04r7IlkuLNSf0Fx5Ljt2kgAGdJguY4DnUtJ/b8=; b=GNWQXfGIQWjJy5NU9wGIHlzMnnAEFFeSeZJGJcIDgWnQCUv0p3e3GoQmvg6/aLZmXd l1Xw0I4WBrR39F6sKzxIJY4tuamj5+o84EWWu4/RhrqeMju7CykPQxDfXnK0IvPWn6da haba4ZkLNXjDgYtaEhCq6BMH5ASVa9eUjCSiNt0uV1bWrhnJDnTq7D0OT+SwlPar04XF ombrsDQmd+EPjLHX5XRR53HoBNxXboD6kToYfJyp++h+nLhOxF5WrVIgTwxWeH5rjQlt 70rt1oymdV6LzdhglXtdYfcucv1hYeKevE8hw9B9KEd7SyN/0Dr5gXWup43KdawQGeOY dbBQ== X-Gm-Message-State: AOAM532ch0niS3h3+xSUv4rpAWhCbT1I9ATAletWIQvn7MyYG3yYxJMU f+78kIvqisYzmOuQp+ZHb8dzAtEClE8= X-Google-Smtp-Source: ABdhPJz4s0U3OrSduIS0MbJDQ5m1/31eejUDpByVxj1kC9XVSeruoZvO4vC1HUwp9bpHoHk61XYNwQ== X-Received: by 2002:a17:906:26da:b0:6d6:da2e:d338 with SMTP id u26-20020a17090626da00b006d6da2ed338mr10306019ejc.700.1647632158503; Fri, 18 Mar 2022 12:35:58 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d7-20020a50cd47000000b004187eacb4d6sm4544514edj.37.2022.03.18.12.35.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 12:35:58 -0700 (PDT) From: Liliana Marie Prikler Date: Fri, 18 Mar 2022 20:16:39 +0100 Message-ID: MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::642 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x642.google.com X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2018 Steve Sprang +;;; Copyright © 2022 Liliana Marie Prikler ;;; ;;; This file is part of GNU Guix. ;;; @@ -1543,13 +1544,33 @@ (define (dependencies->recutils packages) (sort packages packagerecutils 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 (packagerecutils p <>) (package-outputs/out-last p))) (format port "systems: ~a~%" (split-lines (string-join (package-transitive-supported-systems p)) (string-length "systems: ")))