GNU bug report logs - #41183
[PATCH 0/1] guix package, show: Support multiple queries.

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Sun, 10 May 2020 23:39:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#41183: closed ([PATCH 0/1] guix package, show: Support
 multiple queries.)
Date: Mon, 11 May 2020 20:26:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 11 May 2020 22:25:45 +0200
with message-id <87ftc6fcc6.fsf <at> gnu.org>
and subject line Re: [bug#41183] [PATCH] guix package, show: Support multiple queries.
has caused the debbugs.gnu.org bug report #41183,
regarding [PATCH 0/1] guix package, show: Support multiple queries.
to be marked as done.

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


-- 
41183: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41183
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: zimoun <zimon.toutoune <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 0/1] guix package, show: Support multiple queries.
Date: Mon, 11 May 2020 01:37:47 +0200
Dear,

This patch adds the feature:

  guix package --show=emacs --show=hello

and therefore, it allows to pipe:

 guix graph emacs --path libffi | xargs guix show


Note that:

 1. "guix package" processes from right to left.
 2. "guix show" processes from left to right.

It is how "guix packages" is implemented.  However, it appears more natural to
display in order; that's why "guix show" reverses the order.

 3. Because dealing with multiple different queries does not seems "keep it
 simple", "guix package" starts with the last query (the most of left) and
 then processes all the queries corresponding to this one.


For example,

a) guix package --show=emacs --search=hello --show=libffi
will show the packages 'emacs' and 'libffi', skipping 'search'.

b) guix package --show=emacs  --show=libffi --search=hello
will search the package 'hello', skipping 'show'.

It is already how '--search' works and has been extended to '--show'.  Does it
need to be documented in the manua?



All the best,
simon




zimoun (1):
  guix package, show: Support multiple queries.

 guix/scripts/package.scm | 7 ++++++-
 guix/scripts/show.scm    | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.26.1



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 41183-done <at> debbugs.gnu.org
Subject: Re: [bug#41183] [PATCH] guix package, show: Support multiple queries.
Date: Mon, 11 May 2020 22:25:45 +0200
Hello,

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

> * guix/scripts/package.scm (process-query): Show multiple queries.
> * guix/scripts/show.scm (guix-show): Reverse to display in order.

Yay, applied!

> Note that:
>
>  1. "guix package" processes from right to left.
>  2. "guix show" processes from left to right.
>
> It is how "guix packages" is implemented.  However, it appears more natural to
> display in order; that's why "guix show" reverses the order.
>
>  3. Because dealing with multiple different queries does not seems "keep it
>  simple", "guix package" starts with the last query (the most of left) and
>  then processes all the queries corresponding to this one.
>
>
> For example,
>
> a) guix package --show=emacs --search=hello --show=libffi
> will show the packages 'emacs' and 'libffi', skipping 'search'.
>
> b) guix package --show=emacs  --show=libffi --search=hello
> will search the package 'hello', skipping 'show'.
>
> It is already how '--search' works and has been extended to '--show'.  Does it
> need to be documented in the manua?

Weirdness.  I think we should improve all that rather than document it,
addressing also some of the issues raised in
<https://issues.guix.gnu.org/issue/40549>.

Thanks,
Ludo’.


This bug report was last modified 5 years and 12 days ago.

Previous Next


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