From: Simon Tournier <zimon.toutoune@gmail.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 67241@debbugs.gnu.org
Subject: bug#67241: [PATCH] guix-install.sh: Add message about Info reader.
Date: Mon, 16 Dec 2024 18:58:58 +0100 [thread overview]
Message-ID: <87ldwf7bml.fsf@gmail.com> (raw)
In-Reply-To: <87r068uyn5.fsf@gmail.com>
Hi Maxim,
On Mon, 16 Dec 2024 at 11:53, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>> +_info()
>> +{
>> + if [ "$(type -P info)" ]; then
>> + _msg "$1"
>> + else
>> + _msg "${WAR}Please install Info reader; see package 'info-reader'"
>> + _msg "$1"
>> + fi
>> +}
>
> It seems odd to me to "overload" _msg into _info that deals with some side
> effect; I'd rather see this conditional explicit at the message printing
> site.
It was to avoid the duplication of the exact same conditional with the
exact same message.
I do not have an opinion…
> Also, your test is testing for the empty string when info is not found,
> not the exist status, which is wrong.
Please note that the script already uses:
if [ "$(type -P pidof)" ]; then
if [ ! "$(pidof nscd)" ]; then
And I have only respected the same. :-)
> not the exist status, which is wrong. I think you meant something like:
>
> --8<---------------cut here---------------start------------->8---
> if type -P info >/dev/null then [...]; fi
> --8<---------------cut here---------------end--------------->8---
Well, I am not a Bash expert but I guess that’s the same result in
practise, no?
Both $() and "" used in tandem makes the test sound, from my
understanding.
> But this got me curious again... could we instead automate the
> installation of info post-installation?
It appears to me unrelated to this change at hand. :-)
> If yes, we should also automate
> the installation of glibc-locales, using prompts that the user can
> accept or decline like for the other configuration choices.
Yeah why not, but let open another issue for tracking that, because
that’s not necessary straightforward since it’s on the top of different
distros.
Cheers,
simon
prev parent reply other threads:[~2024-12-17 20:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 10:38 bug#67241: guix-install.sh: Run ’info guix’ needs ’info’ Simon Tournier
2024-11-12 6:28 ` Maxim Cournoyer
2024-11-16 7:54 ` bug#67241: [PATCH] guix-install.sh: Add message about Info reader Simon Tournier
2024-12-16 2:53 ` Maxim Cournoyer
2024-12-16 17:58 ` Simon Tournier [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ldwf7bml.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=67241@debbugs.gnu.org \
--cc=maxim.cournoyer@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 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).