GNU bug report logs - #53909
[PATCH 0/4] 'guix pull -l' no longer displays package lists by default

Previous Next

Package: guix-patches;

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

Date: Wed, 9 Feb 2022 22:13:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53909 in the body.
You can then email your comments to 53909 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to zimon.toutoune <at> gmail.com, guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Wed, 09 Feb 2022 22:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to zimon.toutoune <at> gmail.com, guix-patches <at> gnu.org. (Wed, 09 Feb 2022 22:13:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default
Date: Wed,  9 Feb 2022 23:12:37 +0100
Hi!

The other day on IRC zimoun noted that ‘guix pull -l’ doesn’t work for
them because it prints those long package lists, which incidentally
makes it slower.

This series changes ‘guix pull -l’ so that by default it only prints
channel info and news:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix pull -l
Generation 192       Oct 25 2021 00:12:47
  guix b5f45a2
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: b5f45a21c27b80210753e184e52708bb75a347bb
Generation 193       Oct 25 2021 21:29:18
  guix b0735c7
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: b0735c79b0d1d34117ec36d5dc5f14a3f9392bc1

News for channel 'guix'
  New `guix shell' command supersedes `guix environment'
    commit 746584e0ca200e7bf51b139ceb36c19ea81d6ef1

    A new `guix shell' command is now available.  It is similar to `guix environment', but with a
    more convenient interface (`guix environment' is deprecated but will remain available until
    May, 1st 2023).  The main difference compared to `guix environment' is that the "ad hoc" mode
    is the default.  Thus, to create an interactive environment containing Python, NumPy, and
    SciPy, you would run:
    
         guix shell python python-numpy python-scipy
    
    To get a development environment for, say, Inkscape, pass the `-D' flag:
    
         guix shell -D inkscape
    
    Another difference is that running `guix shell' without arguments loads `manifest.scm' or
    `guix.scm' for the current directory or an ancestor, provided you allowed it.  The command
    maintains a cache to speed up access to such environments.
    
    Run `info "(guix) Invoking guix shell"' for more information.

Generation 194       Nov 07 2021 23:40:30
  guix bd41e59
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: bd41e590dd24e54797fb8b6854c244efd4d12df5
--8<---------------cut here---------------end--------------->8---

One can pass ‘--details’ to get view new/upgraded packages:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix pull --detail -l
Generation 192       Oct 25 2021 00:12:47
  guix b5f45a2
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: b5f45a21c27b80210753e184e52708bb75a347bb
Generation 193       Oct 25 2021 21:29:18
  guix b0735c7
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: b0735c79b0d1d34117ec36d5dc5f14a3f9392bc1
  3 new packages: lttng-tools, vim-gitgutter, vim-mucomplete
  7 packages upgraded: flatpak <at> 1.12.1, libportal <at> 0.4, mspdebug <at> 0.25-0.4c4d94e,
    p11-kit <at> 0.24.0, reprotest <at> 0.7.18, xdg-desktop-portal-gtk <at> 1.10.0, xdg-desktop-portal <at> 1.10.1

News for channel 'guix'
  New `guix shell' command supersedes `guix environment'
--8<---------------cut here---------------end--------------->8---

Last, ‘guix pull -l’ pipes its output to $PAGER by default.

Thoughts?

Ludo’.

Ludovic Courtès (4):
  pull: '--list-generations' doesn't list package changes by default.
  ui: 'with-paginated-output-port' gives access to the wrapped port.
  ui: 'display-generation' uses color when talking to a pager.
  pull: '--list-generations' pipes its output to the pager.

 doc/guix.texi         | 15 +++++++++------
 guix/scripts/pull.scm | 35 +++++++++++++++++++++++++++--------
 guix/ui.scm           | 24 ++++++++++++++++++++++--
 3 files changed, 58 insertions(+), 16 deletions(-)

-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Wed, 09 Feb 2022 22:18:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53909 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 1/4] pull: '--list-generations' doesn't list package changes
 by default.
Date: Wed,  9 Feb 2022 23:17:09 +0100
* guix/scripts/pull.scm (show-help, %options): Add "--details".
(process-query): Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
---
 doc/guix.texi         | 15 +++++++++------
 guix/scripts/pull.scm | 19 +++++++++++++++----
 2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 583ba1c61d..5ef750786f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4426,18 +4426,12 @@ Generation 2	Jun 11 2018 11:02:49
     repository URL: https://git.savannah.gnu.org/git/guix.git
     branch: origin/master
     commit: e0cc7f669bec22c37481dd03a7941c7d11a64f1d
-  2 new packages: keepalived, libnfnetlink
-  6 packages upgraded: emacs-nix-mode@@2.0.4,
-    guile2.0-guix@@0.14.0-12.77a1aac, guix@@0.14.0-12.77a1aac,
-    heimdal@@7.5.0, milkytracker@@1.02.00, nix@@2.0.4
 
 Generation 3	Jun 13 2018 23:31:07	(current)
   guix 844cc1c
     repository URL: https://git.savannah.gnu.org/git/guix.git
     branch: origin/master
     commit: 844cc1c8f394f03b404c5bb3aee086922373490c
-  28 new packages: emacs-helm-ls-git, emacs-helm-mu, @dots{}
-  69 packages upgraded: borg@@1.1.6, cheese@@3.28.0, @dots{}
 @end example
 
 @xref{Invoking guix describe, @command{guix describe}}, for other ways to
@@ -4507,6 +4501,15 @@ is provided, the subset of generations that match @var{pattern}.
 The syntax of @var{pattern} is the same as with @code{guix package
 --list-generations} (@pxref{Invoking guix package}).
 
+By default, this prints information about the channels used in each
+revision as well as the corresponding news entries.  If you pass
+@option{--details}, it will also print the list of packages added and
+upgraded in each generation compared to the previous one.
+
+@item --details
+Instruct @option{--list-generations} to display more information about
+the differences between subsequent generations---see above.
+
 @item --roll-back
 @cindex rolling back
 @cindex undoing transactions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index fb8ce50fa7..707f1f0929 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2013-2015, 2017-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;;
@@ -104,6 +104,8 @@ (define (show-help)
   (display (G_ "
   -l, --list-generations[=PATTERN]
                          list generations matching PATTERN"))
+  (display (G_ "
+      --details          show details when listing generations"))
   (display (G_ "
       --roll-back        roll back to the previous generation"))
   (display (G_ "
@@ -138,6 +140,9 @@ (define %options
                  (lambda (opt name arg result)
                    (cons `(query list-generations ,arg)
                          result)))
+         (option '("details") #f #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'details? #t result)))
          (option '("roll-back") #f #f
                  (lambda (opt name arg result)
                    (cons '(generation roll-back)
@@ -640,17 +645,23 @@ (define (package-alist generation)
 
 (define (process-query opts profile)
   "Process any query on PROFILE specified by OPTS."
+  (define details?
+    (assoc-ref opts 'details?))
+
   (match (assoc-ref opts 'query)
     (('list-generations pattern)
      (define (list-generations profile numbers)
        (match numbers
          ((first rest ...)
           (display-profile-content profile first)
+
           (let loop ((numbers numbers))
             (match numbers
               ((first second rest ...)
-               (display-profile-content-diff profile
-                                             first second)
+               (if details?
+                   (display-profile-content-diff profile
+                                                 first second)
+                   (display-profile-content profile second))
                (display-channel-news (generation-file-name profile second)
                                      (generation-file-name profile first))
                (loop (cons second rest)))
@@ -754,7 +765,7 @@ (define (environment-variable)
 (define-command (guix-pull . args)
   (synopsis "pull the latest revision of Guix")
 
-  (define (no-arguments arg _‌)
+  (define (no-arguments arg _)
     (leave (G_ "~A: extraneous argument~%") arg))
 
   (with-error-handling
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Wed, 09 Feb 2022 22:18:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53909 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 2/4] ui: 'with-paginated-output-port' gives access to the
 wrapped port.
Date: Wed,  9 Feb 2022 23:17:10 +0100
* guix/ui.scm (pager-port-mapping): New variable.
(pager-wrapped-port): New procedure.
(call-with-paginated-output-port): Parameterize 'pager-port-mapping'.
---
 guix/ui.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 093de1b4ab..d1f92ce7be 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -124,6 +124,7 @@ (define-module (guix ui)
             file-hyperlink
             location->hyperlink
 
+            pager-wrapped-port
             with-paginated-output-port
             relevance
             package-relevance
@@ -1665,6 +1666,20 @@ (define (package-relevance package regexps)
 zero means that PACKAGE does not match any of REGEXPS."
   (relevance package regexps %package-metrics))
 
+(define pager-port-mapping
+  ;; If a pager is being used, via 'with-paginated-output-port', this maps the
+  ;; pager port (pipe) to the underlying output port.
+  (make-parameter #f))
+
+(define* (pager-wrapped-port #:optional (port (current-output-port)))
+  "If PORT is a pipe to a pager created by 'with-paginated-output-port',
+return the underlying port.  Otherwise return #f."
+  (match (pager-port-mapping)
+    ((pager . wrapped)
+     (and (eq? pager port) wrapped))
+    (_
+     #f)))
+
 (define* (call-with-paginated-output-port proc
                                           #:key (less-options "FrX"))
   (let ((pager-command-line (or (getenv "GUIX_PAGER")
@@ -1691,7 +1706,10 @@ (define* (call-with-paginated-output-port proc
                                                      char-set:whitespace))))))
           (dynamic-wind
             (const #t)
-            (lambda () (proc pager))
+            (lambda ()
+              (parameterize ((pager-port-mapping
+                              (cons pager (current-output-port))))
+                (proc pager)))
             (lambda () (close-pipe pager))))
         (proc (current-output-port)))))
 
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Wed, 09 Feb 2022 22:18:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53909 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 3/4] ui: 'display-generation' uses color when talking to a
 pager.
Date: Wed,  9 Feb 2022 23:17:11 +0100
This makes sure that, say, 'guix pull -l' benefits from colors when its
output is piped to a pager, as long as the underlying terminal supports
it.

* guix/ui.scm (display-generation): Add second argument to 'highlight'.
---
 guix/ui.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index d1f92ce7be..238952723e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1900,7 +1900,9 @@ (define (display-generation profile number)
            (link   (if (supports-hyperlinks?)
                        (cut file-hyperlink file <>)
                        identity))
-           (header (format #f (link (highlight (G_ "Generation ~a\t~a")))
+           (header (format #f (link (highlight (G_ "Generation ~a\t~a")
+                                               (or (pager-wrapped-port)
+                                                   (current-output-port))))
                            number
                            (date->string
                             (time-utc->date
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Wed, 09 Feb 2022 22:18:03 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53909 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 4/4] pull: '--list-generations' pipes its output to the pager.
Date: Wed,  9 Feb 2022 23:17:12 +0100
* guix/scripts/pull.scm (process-query): For 'list-generations queries,
use 'with-paginated-output-port'.
(display-news-entry-title): Pass second argument to 'highlight'.
(display-news-entry): Pass second argument to 'dim'.
---
 guix/scripts/pull.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 707f1f0929..7fe738229b 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -279,7 +279,8 @@ (define title
                   (texi->plain-text title))
 
                 ;; When Texinfo markup is invalid, display it as-is.
-                (const title)))))))
+                (const title)))
+             (or (pager-wrapped-port port) port)))))
 
 (define (display-news-entry entry channel language port)
   "Display ENTRY, a <channel-news-entry> from CHANNEL, in LANGUAGE, a language
@@ -291,7 +292,8 @@ (define commit
     (channel-news-entry-commit entry))
 
   (display-news-entry-title entry language port)
-  (format port (dim (G_ "    commit ~a~%"))
+  (format port (dim (G_ "    commit ~a~%")
+                    (or (pager-wrapped-port port) port))
           (if (supports-hyperlinks?)
               (channel-commit-hyperlink channel commit)
               commit))
@@ -673,14 +675,20 @@ (define (list-generations profile numbers)
              (raise (condition (&profile-not-found-error
                                 (profile profile)))))
             ((not pattern)
-             (list-generations profile (profile-generations profile)))
+             (with-paginated-output-port port
+               (with-output-to-port port
+                 (lambda ()
+                   (list-generations profile (profile-generations profile))))))
             ((matching-generations pattern profile)
              =>
              (match-lambda
                (()
                 (exit 1))
                ((numbers ...)
-                (list-generations profile numbers)))))))
+                (with-paginated-output-port port
+                  (with-output-to-port port
+                    (lambda ()
+                      (list-generations profile numbers))))))))))
     (('display-news)
      (display-news profile))))
 
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Thu, 10 Feb 2022 17:52:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 53909 <at> debbugs.gnu.org
Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays
 package lists by default
Date: Thu, 10 Feb 2022 18:21:49 +0100
[Message part 1 (text/plain, inline)]
Hi Ludo,

Cool!  Thanks.


On Wed, 09 Feb 2022 at 23:17, Ludovic Courtès <ludo <at> gnu.org> wrote:

> * guix/scripts/pull.scm (show-help, %options): Add "--details".

IMHO, the commit online header should reflect that.


> diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm

[...]

>  (define (process-query opts profile)
>    "Process any query on PROFILE specified by OPTS."
> +  (define details?
> +    (assoc-ref opts 'details?))
> +
>    (match (assoc-ref opts 'query)
>      (('list-generations pattern)
>       (define (list-generations profile numbers)
>         (match numbers
>           ((first rest ...)
>            (display-profile-content profile first)
> +
>            (let loop ((numbers numbers))
>              (match numbers
>                ((first second rest ...)
> -               (display-profile-content-diff profile
> -                                             first second)
> +               (if details?
> +                   (display-profile-content-diff profile
> +                                                 first second)
> +                   (display-profile-content profile second))
>                 (display-channel-news (generation-file-name profile second)
>                                       (generation-file-name profile first))
>                 (loop (cons second rest)))

Well, "guix pull --details" pulls; which I find annoying.  Instead, I
propose to silently runs "guix pull --details -l", see this diff:

[foo.patch (text/x-diff, inline)]
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 707f1f0929..fb1dd6c82c 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -142,7 +142,9 @@ (define %options
                          result)))
          (option '("details") #f #f
                  (lambda (opt name arg result)
-                   (alist-cons 'details? #t result)))
+                   (alist-cons 'details? #t
+                               (cons '(query list-generations #f)
+                                     result))))
          (option '("roll-back") #f #f
                  (lambda (opt name arg result)
                    (cons '(generation roll-back)
[Message part 3 (text/plain, inline)]
Because warn people that "guix pull --details" alone is not what they
want adds some complexity, and when '--details' only works in tandem
with the option '--list-generations', that’s why I propose this
behaviour.


Last, about this change…

> -  (define (no-arguments arg _‌)
> +  (define (no-arguments arg _)

…it a Git twist?  I miss what changed––my whitespace mode is badly
configured?



Cheers,
simon

Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Thu, 10 Feb 2022 17:52:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 53909 <at> debbugs.gnu.org
Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays
 package lists by default
Date: Thu, 10 Feb 2022 18:51:08 +0100
Hi Ludo,


On Wed, 09 Feb 2022 at 23:12, Ludovic Courtès <ludo <at> gnu.org> wrote:

> The other day on IRC zimoun noted that ‘guix pull -l’ doesn’t work for
> them because it prints those long package lists, which incidentally
> makes it slower.

My remark is based on the rate of changes.  Let assume that regular
users "pull" once a week – I even guess it is less frequent than that.

Here the number of additions this user would see for the last 10 weeks:

--8<---------------cut here---------------start------------->8---
$ for i in $(seq 10); do git log --after="$(($i + 1)) week ago" --before="$i week ago" --oneline | grep Add | wc -l; done
108
59
84
149
76
212
48
83
46
63
--8<---------------cut here---------------end--------------->8---

And for Update, it reads:

--8<---------------cut here---------------start------------->8---
106
115
103
247
261
134
167
99
100
145
--8<---------------cut here---------------end--------------->8---

Therefore, the current display of “guix pull -l” is not human readable.


> $ ./pre-inst-env guix pull --details -l

Note it hits bug#50472 [1].  Other said,

    guix pull -l --details

does not work as expected.

1:<http://issues.guix.gnu.org/issue/50472



> Ludovic Courtès (4):
>   pull: '--list-generations' doesn't list package changes by default.
>   ui: 'with-paginated-output-port' gives access to the wrapped port.
>   ui: 'display-generation' uses color when talking to a pager.
>   pull: '--list-generations' pipes its output to the pager.

Well, I am mainly running CLI with Emacs ’M-x shell’, so Emacs is my
pager. :-)  However, I have tried with xterm and PAGER=less, nothing is
different.  Do I miss something?



Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Mon, 14 Feb 2022 12:57:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 53909 <at> debbugs.gnu.org
Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays
 package lists by default
Date: Mon, 14 Feb 2022 13:56:19 +0100
Hi!

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

> On Wed, 09 Feb 2022 at 23:12, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>> The other day on IRC zimoun noted that ‘guix pull -l’ doesn’t work for
>> them because it prints those long package lists, which incidentally
>> makes it slower.
>
> My remark is based on the rate of changes.  Let assume that regular
> users "pull" once a week – I even guess it is less frequent than that.
>
> Here the number of additions this user would see for the last 10 weeks:

[...]

> Therefore, the current display of “guix pull -l” is not human readable.

Yeah, though it’s searchable in $PAGER.

>> $ ./pre-inst-env guix pull --details -l
>
> Note it hits bug#50472 [1].  Other said,
>
>     guix pull -l --details
>
> does not work as expected.
>
> 1:<http://issues.guix.gnu.org/issue/50472

Right.

>> Ludovic Courtès (4):
>>   pull: '--list-generations' doesn't list package changes by default.
>>   ui: 'with-paginated-output-port' gives access to the wrapped port.
>>   ui: 'display-generation' uses color when talking to a pager.
>>   pull: '--list-generations' pipes its output to the pager.
>
> Well, I am mainly running CLI with Emacs ’M-x shell’, so Emacs is my
> pager. :-)  However, I have tried with xterm and PAGER=less, nothing is
> different.  Do I miss something?

The output gets piped to the pager now, which wasn’t the case before (I
tested in xterm FWIW).

Thanks,
Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 14 Feb 2022 14:58:02 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Mon, 14 Feb 2022 14:58:03 GMT) Full text and rfc822 format available.

Message #31 received at 53909-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 53909-done <at> debbugs.gnu.org
Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays
 package lists by default
Date: Mon, 14 Feb 2022 15:56:52 +0100
Hi,

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

> On Wed, 09 Feb 2022 at 23:17, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>> * guix/scripts/pull.scm (show-help, %options): Add "--details".
>
> IMHO, the commit online header should reflect that.

Right, fixed.

> Well, "guix pull --details" pulls; which I find annoying.  Instead, I
> propose to silently runs "guix pull --details -l", see this diff:
>
> diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
> index 707f1f0929..fb1dd6c82c 100644
> --- a/guix/scripts/pull.scm
> +++ b/guix/scripts/pull.scm
> @@ -142,7 +142,9 @@ (define %options
>                           result)))
>           (option '("details") #f #f
>                   (lambda (opt name arg result)
> -                   (alist-cons 'details? #t result)))
> +                   (alist-cons 'details? #t
> +                               (cons '(query list-generations #f)
> +                                     result))))

It’s a bit more complicated since you don’t want to override previous
‘-l’ arguments, but I did that.

> Last, about this change…
>
>> -  (define (no-arguments arg _‌)
>> +  (define (no-arguments arg _)
>
> …it a Git twist?  I miss what changed––my whitespace mode is badly
> configured?

There’s a ZERO WIDTH NON-JOINER above; you can see it with a trick I
recently learned: (set-face-background 'glyphless-char "red").

:-)

Anyway, pushed:

  054ec2e242 pull: '--list-generations' pipes its output to the pager.
  5b6e31b020 ui: 'display-generation' uses color when talking to a pager.
  7ffcee1937 ui: 'with-paginated-output-port' gives access to the wrapped port.
  b9df2e2b4d pull: '--list-generations' lists packages only with '--details'.

Thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#53909; Package guix-patches. (Mon, 14 Feb 2022 17:29:01 GMT) Full text and rfc822 format available.

Message #34 received at 53909-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 53909-done <at> debbugs.gnu.org
Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays package
 lists by default
Date: Mon, 14 Feb 2022 18:28:21 +0100
Hi Ludo,

On Mon, 14 Feb 2022 at 15:56, Ludovic Courtès <ludo <at> gnu.org> wrote:

> >           (option '("details") #f #f
> >                   (lambda (opt name arg result)
> > -                   (alist-cons 'details? #t result)))
> > +                   (alist-cons 'details? #t
> > +                               (cons '(query list-generations #f)
> > +                                     result))))
>
> It’s a bit more complicated since you don’t want to override previous
> ‘-l’ arguments, but I did that.

Ah yes, indeed.  Keep the pattern. :-)

> There’s a ZERO WIDTH NON-JOINER above; you can see it with a trick I
> recently learned: (set-face-background 'glyphless-char "red").

Oh, cool.  Thanks!


> Anyway, pushed:

Thanks for the quick fix and I hope more people will read now the news. :-)

Cheers,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Mar 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 156 days ago.

Previous Next


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