From: "Ludovic Courtès" <ludo@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>, Marius Bakke <marius@gnu.org>
Subject: Re: grafted package and CLI
Date: Thu, 07 Jul 2022 10:00:27 +0200 [thread overview]
Message-ID: <87czeh1hes.fsf@gnu.org> (raw)
In-Reply-To: <86ilocxvzv.fsf@gmail.com> (zimoun's message of "Tue, 05 Jul 2022 02:07:32 +0200")
Hi,
zimoun <zimon.toutoune@gmail.com> skribis:
> Or even, it can be confusing:
>
> $ guix shell curl@7.79.1 -- curl --version
> curl 7.84.0 (x86_64-unknown-linux-gnu) libcurl/7.84.0 GnuTLS/3.7.2 zlib/1.2.11 libidn2/2.3.1 nghttp2/1.44.0
> Release-Date: 2022-06-27
> [..]
>
> The issue is not new, e.g., see [1]. I proposed a patch [2] (see below)
> which addresses the issue with “guix show”.
>
> However, it does not address issue with “guix package -A | grep ^curl”;
> and it is potentially not fixable because it uses
> ’fold-available-packages’ which loads the cache (for performance) and
> this cache does not contain the ’replacement’ field – it is not a good
> idea to introduce it, IMHO.
Usually, when the replacement is a different version, we make it public,
so it also shows up in ‘guix package -A’. It’s just a convention, but
it’s probably good enough?
> diff --git a/guix/ui.scm b/guix/ui.scm
> index 7fbd4c63a2..b6497f5e5c 100644
> --- a/guix/ui.scm
> +++ b/guix/ui.scm
> @@ -1528,9 +1528,18 @@ HYPERLINKS? is true, emit hyperlink escape sequences when appropriate."
> (define (package<? p1 p2)
> (string<? (package-full-name p1) (package-full-name p2)))
>
> + (define replacement
> + (package-replacement p))
> +
> ;; 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))
> + (when replacement
> + (unless
> + (string=?
> + (package-version p)
> + (package-version replacement))
> + (format port "replacement: ~a~%" (package-version replacement))))
> (format port "outputs: ~a~%" (string-join (package-outputs p)))
> (format port "systems: ~a~%"
> (string-join (package-transitive-supported-systems p)))
I’m all for it! If you want you can resent the whole thing produced by
‘git format-patch’, or I can apply it and provide a commit message on
your behalf.
Thanks,
Ludo’.
next prev parent reply other threads:[~2022-07-07 8:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 0:07 grafted package and CLI zimoun
2022-07-07 8:00 ` Ludovic Courtès [this message]
2022-07-07 13:29 ` zimoun
2022-07-07 15:09 ` Ludovic Courtès
2022-07-07 16:58 ` zimoun
2022-07-17 15:35 ` bokr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czeh1hes.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=marius@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.