From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kPS/M9zSY2f9dAAAe85BDQ:P1 (envelope-from ) for ; Thu, 19 Dec 2024 08:01:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kPS/M9zSY2f9dAAAe85BDQ (envelope-from ) for ; Thu, 19 Dec 2024 09:01:32 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=KdFk7ui8; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=HDesbOqD; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734595292; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aETYbzidIDrahpWFzP9k9cE3r79yfP8+LQ5YexdUNJM=; b=A21KNVABOyy+uSjQ8AOJzA+P7MKCy861sNvnbzAuiUwm5L6M56CDSVjaDrtJG2d2wWiQY6 zokj11RrJWBPdhYCzP7yGc5M6ybAyazPA1I1VUcrnjsD0IJ6nGpqsjX0wPPFyFCxV17JAE Jfsyyrpk6rEt0gziWEA/sALA9nZQa8J7+Avtn/zP/ZYrHmIwCJ2BVKm+pHG7UXTSQv20cn qVH7nLEjMf+JL8d1TdreU/mhoqhFyRZB7+e79ptOTjKpWLhO0qn9DaMIYFM9J5OGlpToLz ErOrTsVR365Q+Lfx8p1kp+gMvlFypyNtYzWIjuBXSQMRtjIAxP46q5uLoKf1OA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=KdFk7ui8; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=HDesbOqD; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734595292; a=rsa-sha256; cv=none; b=Zrn5SxFKRTxOVqm5D++2GHUPVqF/cYFh8EXF2pCcIlce8YAElV3IeETeQ9xp96XPMwFjDM 5mLADc91qdxMStBV6k8pNugDlDvD75Q6qM8iyKsX0Nac2FxtVmMrXg2luNPqyn9F27cXmT phM4CaD1oGzRifmdJKjNCf3Dp26ewpb7B/5xjQe2I0bYyRDPjm4yvQfvfDbV4AtSwfYD7u M7z6u4Z+H8FHTeyYkliGSAbO51l/N4sp23JnNNCtB5bq4xEwNpKRhJ8jL+r1FkDf3577Mn lh/IqceJYOa/BW1S73fsR+2SAffWz7x4lpWQ0WLTfMZoTiqkv5P/b01N2oBO+g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 904C42ED2 for ; Thu, 19 Dec 2024 09:01:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBT7-0005SL-8d; Thu, 19 Dec 2024 03:01:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOBSw-0005P6-OS for bug-guix@gnu.org; Thu, 19 Dec 2024 03:01:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOBSw-0005W7-ET for bug-guix@gnu.org; Thu, 19 Dec 2024 03:01:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=aETYbzidIDrahpWFzP9k9cE3r79yfP8+LQ5YexdUNJM=; b=KdFk7ui8UQF97hyMUPucQCiwQvxdbWkzwRfHLSOnlKiFw9WXBfV5w+PPNxj4wrlwRssiGgb0BWypp1kWnqbS+NQfkQGNMJqaSbwRwQQ3pZFXnYd3tZCOrYliwFlpXdMa10ZGS/IxzmWSW+Ed/lwSz4WB1QQwAUP3XgtpGsAblFa3AfAer9HcJh0Ye2K99tj01QmZGdp6TXQSIyBgMy+Qrxrc90x/P6eTmYcvKe6cP9RL7NZ0t3ApXcBsqz0L7Sn0DYWIRfAAi/Fyf7eNEoVrOIvNxDRIUGn4Igo++dZcebQGkrj2EXFb/eDqYjHLxf6shrtyGQy1aTCavMk7VAF+LQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOBSv-0000YS-RT for bug-guix@gnu.org; Thu, 19 Dec 2024 03:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#67241: [PATCH] guix-install.sh: Add message about Info reader. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 19 Dec 2024 08:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67241 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Simon Tournier Cc: 67241@debbugs.gnu.org Received: via spool by 67241-submit@debbugs.gnu.org id=B67241.17345952071564 (code B ref 67241); Thu, 19 Dec 2024 08:01:01 +0000 Received: (at 67241) by debbugs.gnu.org; 19 Dec 2024 08:00:07 +0000 Received: from localhost ([127.0.0.1]:37315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOBS2-0000P6-Ha for submit@debbugs.gnu.org; Thu, 19 Dec 2024 03:00:06 -0500 Received: from mail-pf1-f173.google.com ([209.85.210.173]:61792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOBS0-0000Nw-6H for 67241@debbugs.gnu.org; Thu, 19 Dec 2024 03:00:04 -0500 Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-725abf74334so434414b3a.3 for <67241@debbugs.gnu.org>; Thu, 19 Dec 2024 00:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734595138; x=1735199938; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aETYbzidIDrahpWFzP9k9cE3r79yfP8+LQ5YexdUNJM=; b=HDesbOqDPGV5ml3N/9M27cZCepDkoxlJrFcrOPsYbNYC93W+c+lhLdDds7EYF3O2df aSOHbyxSl+dWw+Viy3FWEJ07uZskTBnNTF3puGCD1MOmRWKR3CHAPMCooT4STV3J5OJa fJTKeiTP4qMxS80PDW/9gThCjMDpMzx2DnW18oWmwJJtojquQ1bY0h/jpwc+NTwA/9P8 Jc/CgDHQYI8w1mG4HbIILxWp2/NNvcP0NwGmEDuqNiizJM+Ub+MOu0DnPdtzFjitkV4D BV2gMEvZbbMvKnj32y5k37NfWKpgtcPR/iGCmYyDXnSXF1enEuL7tq3tRHuowSzqaKn9 AbxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734595138; x=1735199938; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aETYbzidIDrahpWFzP9k9cE3r79yfP8+LQ5YexdUNJM=; b=tUS3lb3zRaYg8oRD6hzoLrsebPYAoU0ndy0pbeSitU6saC2eS4s381qTaDFao0CCNS k7ldX8WMRm7nfllzj+rDWZstGLDpWUAl/HO5hyfqKCZWlQqewCy+gfIMV2Ce9EU0jMY0 6CTR9yqiUkJsBwv+83llljulPctKy/ynZ5EfK2JVVbYUsJdcDUPNrkJPtbyuRujj/v2h HKJej3iadrHhwsKYWcFS36V/gAVuF2go3uoPcmjaCXkg0b61Sk+ic1+V49jmHtbwujLO bEX9612iYyf7ZKpLCVaitfHMhmpNg/R5uObuJbXBwmhUQavyMq/lUkJxoAhypMeyUDkV QfYA== X-Gm-Message-State: AOJu0YxWvwkJX0qnA4gJDDs7tOmeqC5YK921dbkkQ+4djX65ACf242Jd j9jdYz3+JiRqDNbKZQRzYy+rn5YtlwN9CIgXPzkJo1mB6nSlgNlfoGOzXqzHxmM= X-Gm-Gg: ASbGncsmt3nm01b4Q4Eb8oSIzIDx+tM0Tj/JcCLJEQ/nyr+W1xERa3TcsdDAJXXeKi7 mSVuitoG8rQfvU6WcEiV/Fs4v5F04i1cMUVTCGP2yqjO9FDr6ZkB0Jyj9Npwol+ejyHC0FSM6wd FwioWQaGNSSIyk9+O8UH1KbMM9qWIrgkJ6teNXNLDpuvPcC3Ia+RsxLz1dceVyrczzyExpxKJ1b yZiXWvC9lLn5bGYSCO4okFhhOthGBice4x9/BtTC0vXpPn0y69sBA== X-Google-Smtp-Source: AGHT+IFOjfXVfwcaukdnaiDoeCuGKqeBaxk1l/SLtncWWk4Ku9Jn8B2wit1w1ng0k1Cwt/ZluseT4A== X-Received: by 2002:a05:6a20:43a9:b0:1e1:9fef:e958 with SMTP id adf61e73a8af0-1e5b4600269mr9006810637.9.1734595137749; Wed, 18 Dec 2024 23:58:57 -0800 (PST) Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8fabc9sm704724b3a.141.2024.12.18.23.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 23:58:57 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87ldwf7bml.fsf@gmail.com> (Simon Tournier's message of "Mon, 16 Dec 2024 18:58:58 +0100") References: <87h68d6k4e.fsf@gmail.com> <87r068uyn5.fsf@gmail.com> <87ldwf7bml.fsf@gmail.com> Date: Thu, 19 Dec 2024 16:58:48 +0900 Message-ID: <87frmkkssn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -0.53 X-Spam-Score: -0.53 X-Migadu-Queue-Id: 904C42ED2 X-TUID: l8SQcx/sP3jf Hi Simon, Simon Tournier writes: > Hi Maxim, > > On Mon, 16 Dec 2024 at 11:53, Maxim Cournoyer = wrote: > >>> +_info() >>> +{ >>> + if [ "$(type -P info)" ]; then >>> + _msg "$1" >>> + else >>> + _msg "${WAR}Please install Info reader; see package 'info-read= er'" >>> + _msg "$1" >>> + fi >>> +} >> >> It seems odd to me to "overload" _msg into _info that deals with some si= de >> 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=E2=80=A6 Hm. I agree duplication is not nice. Probably a naming issue ;-) >> 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. :-) According to git blame these lines were also authored by you 4 years ago, ha! >> 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=E2=80=99s the same result in > practise, no? It checks the exit status instead of the captured string output. While it's not that bad in that case, in general I find checking for the exit status a much more reliable and clean option. > Both $() and "" used in tandem makes the test sound, from my > understanding. Hm. Is [ "something" ] true and [ "" ] false? Apparently it is, but I'd argue that's not very clear, especially when there are explicit test operations to check for an non-empty or empty string (test -n and test -z). >> 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. :-) It's related in that if the user opted to install 'info-reader' (on by default), we wouldn't have to warn anything about, but yes, we can do so later if you prefer, as I expect it's not that trivial. I don't have strong feelings about the change as-is anymore, but I may refactor the type -P checks to use the alternative style outlined above, if you don't mind. --=20 Thanks, Maxim