unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Improve the output of `guix refresh -l`
@ 2022-03-17 10:22 Zhu Zihao
  2022-03-17 15:28 ` Maxime Devos
  2022-04-30  9:40 ` zimoun
  0 siblings, 2 replies; 5+ messages in thread
From: Zhu Zihao @ 2022-03-17 10:22 UTC (permalink / raw)
  To: Guix Devel

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

Hello, Guix!

Inspired by
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=209a3274f8702acd32fa2a489667048ca4ad304b.
I found that the output of `guix refresh -l` for package have many
dependants is not convenient to read.

for example, run `guix refresh -l pango`, The terminal prints:

```
Building the following 2945 packages would ensure 7521 dependent
packages are rebuilt: ......<long long package list>
```

The package list is too long to read, flood my terminal with package
names. It will hide the actual rebuilt count, I have to pipe the output
to less command to make sure I can see it.

What about add an option like `--detail` for `guix refresh -l`?
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Improve the output of `guix refresh -l`
  2022-03-17 10:22 Improve the output of `guix refresh -l` Zhu Zihao
@ 2022-03-17 15:28 ` Maxime Devos
  2022-03-24 21:08   ` Ludovic Courtès
  2022-04-30  9:40 ` zimoun
  1 sibling, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2022-03-17 15:28 UTC (permalink / raw)
  To: Zhu Zihao, Guix Devel

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]

Zhu Zihao schreef op do 17-03-2022 om 18:22 [+0800]:
> for example, run `guix refresh -l pango`, The terminal prints:
> 
> ```
> Building the following 2945 packages would ensure 7521 dependent
> packages are rebuilt: ......<long long package list>
> ```
> 
> The package list is too long to read, flood my terminal with package
> names. It will hide the actual rebuilt count, I have to pipe the
> output
> to less command to make sure I can see it.
> 
> What about add an option like `--detail` for `guix refresh -l`?

The short option '-l' is a shorthand for the long option
'--list-dependents'.  It seems to me that '--list-dependents' should
actually list the dependents, so I would not do that, otherwise the
option name would (by itself) not correspond to its behaviour anymore.

Maybe something like a '--count-dependents' option would be nice
though.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Improve the output of `guix refresh -l`
  2022-03-17 15:28 ` Maxime Devos
@ 2022-03-24 21:08   ` Ludovic Courtès
  2022-03-25  4:50     ` Zhu Zihao
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2022-03-24 21:08 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Guix Devel

Maxime Devos <maximedevos@telenet.be> skribis:

> Zhu Zihao schreef op do 17-03-2022 om 18:22 [+0800]:
>> for example, run `guix refresh -l pango`, The terminal prints:
>> 
>> ```
>> Building the following 2945 packages would ensure 7521 dependent
>> packages are rebuilt: ......<long long package list>
>> ```
>> 
>> The package list is too long to read, flood my terminal with package
>> names. It will hide the actual rebuilt count, I have to pipe the
>> output
>> to less command to make sure I can see it.
>> 
>> What about add an option like `--detail` for `guix refresh -l`?
>
> The short option '-l' is a shorthand for the long option
> '--list-dependents'.  It seems to me that '--list-dependents' should
> actually list the dependents, so I would not do that, otherwise the
> option name would (by itself) not correspond to its behaviour anymore.

Maybe it could use ‘fill-paragraph’ and
‘call-with-paginated-output-port’ so that it’s less annoying?

> Maybe something like a '--count-dependents' option would be nice
> though.

That too, and/or ‘--direct-dependents’ (sometimes it’s good enough).

Another option would be a ‘guix refresh’ mode that automatically
rebuilds the updated package and its direct dependents.

Thoughts?

Ludo’.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Improve the output of `guix refresh -l`
  2022-03-24 21:08   ` Ludovic Courtès
@ 2022-03-25  4:50     ` Zhu Zihao
  0 siblings, 0 replies; 5+ messages in thread
From: Zhu Zihao @ 2022-03-25  4:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix Devel

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]


Couldn't agree more :)

Ludovic Courtès <ludo@gnu.org> writes:

> Maxime Devos <maximedevos@telenet.be> skribis:
>
>> Zhu Zihao schreef op do 17-03-2022 om 18:22 [+0800]:
>>> for example, run `guix refresh -l pango`, The terminal prints:
>>> 
>>> ```
>>> Building the following 2945 packages would ensure 7521 dependent
>>> packages are rebuilt: ......<long long package list>
>>> ```
>>> 
>>> The package list is too long to read, flood my terminal with package
>>> names. It will hide the actual rebuilt count, I have to pipe the
>>> output
>>> to less command to make sure I can see it.
>>> 
>>> What about add an option like `--detail` for `guix refresh -l`?
>>
>> The short option '-l' is a shorthand for the long option
>> '--list-dependents'.  It seems to me that '--list-dependents' should
>> actually list the dependents, so I would not do that, otherwise the
>> option name would (by itself) not correspond to its behaviour anymore.
>
> Maybe it could use ‘fill-paragraph’ and
> ‘call-with-paginated-output-port’ so that it’s less annoying?
>
>> Maybe something like a '--count-dependents' option would be nice
>> though.
>
> That too, and/or ‘--direct-dependents’ (sometimes it’s good enough).
>
> Another option would be a ‘guix refresh’ mode that automatically
> rebuilds the updated package and its direct dependents.
>
> Thoughts?
>
> Ludo’.


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Improve the output of `guix refresh -l`
  2022-03-17 10:22 Improve the output of `guix refresh -l` Zhu Zihao
  2022-03-17 15:28 ` Maxime Devos
@ 2022-04-30  9:40 ` zimoun
  1 sibling, 0 replies; 5+ messages in thread
From: zimoun @ 2022-04-30  9:40 UTC (permalink / raw)
  To: Zhu Zihao, Guix Devel

Hi,

On Thu, 17 Mar 2022 at 18:22, Zhu Zihao <all_but_last@163.com> wrote:

> for example, run `guix refresh -l pango`, The terminal prints:
>
> ```
> Building the following 2945 packages would ensure 7521 dependent
> packages are rebuilt: ......<long long package list>
> ```
>
> The package list is too long to read, flood my terminal with package
> names. It will hide the actual rebuilt count, I have to pipe the output
> to less command to make sure I can see it.

Instead of piping to less, I pipe to cut,

    guix refresh -l python-numpy | cut -f1 -d':'

And rebuild, I use:

    guix build $(guix refresh -l python-pytorch | cut -f2 -d':')

or if I need a readable list:

    guix refresh -l python-scipy | cut -f2 -d':' | sed 's/ /\n/g'


> What about add an option like `--detail` for `guix refresh -l`?

I agree that the output of “guix refresh -l” is cumbersome. :-)


Cheers,
simon


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-30  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 10:22 Improve the output of `guix refresh -l` Zhu Zihao
2022-03-17 15:28 ` Maxime Devos
2022-03-24 21:08   ` Ludovic Courtès
2022-03-25  4:50     ` Zhu Zihao
2022-04-30  9:40 ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).