all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: 67241@debbugs.gnu.org
Subject: bug#67241: [PATCH] guix-install.sh: Add message about Info reader.
Date: Mon, 16 Dec 2024 11:53:18 +0900	[thread overview]
Message-ID: <87r068uyn5.fsf@gmail.com> (raw)
In-Reply-To: <e8022e114a050910d879193b9ec317826f768278.1731743586.git.zimon.toutoune@gmail.com> (Simon Tournier's message of "Sat, 16 Nov 2024 08:54:07 +0100")

Hi Simon,

Simon Tournier <zimon.toutoune@gmail.com> writes:

> * etc/guix-install.sh (_info): New procedure.
> (_chk_sys_nscd, main_install): Use it.

>
> Change-Id: I2cad8bc2554cd4ea88f30c8a104b7c62f2aa2e0e
> ---
>  etc/guix-install.sh | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index f07b2741bb..08e25de238 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -5,7 +5,7 @@
>  # Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
>  # Copyright © 2019–2020, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
>  # Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
> -# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
> +# Copyright © 2020, 2024 Simon Tournier <zimon.toutoune@gmail.com>
>  # Copyright © 2020 Daniel Brooks <db48x@db48x.net>
>  # Copyright © 2021 Jakub Kądziołka <kuba@kadziolka.net>
>  # Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
> @@ -129,6 +129,16 @@ die()
>      exit 1
>  }
>  
> +_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.

Also, your test is testing for the empty string when info is not found,
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---

But this got me curious again... could we instead automate the
installation of info post-installation?  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.

That'd be more useful than asking the user to manually install things
itself.

-- 
Thanks,
Maxim




      reply	other threads:[~2024-12-16  2:55 UTC|newest]

Thread overview: 4+ 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 [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r068uyn5.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=67241@debbugs.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.