From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KNofFU33omIucQAAbAwnHQ (envelope-from ) for ; Fri, 10 Jun 2022 09:48:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qB8QFE33omIgwgAAG6o9tA (envelope-from ) for ; Fri, 10 Jun 2022 09:48:29 +0200 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 E8C9D36644 for ; Fri, 10 Jun 2022 09:48:28 +0200 (CEST) Received: from localhost ([::1]:55590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzZNb-0003gz-Cv for larch@yhetil.org; Fri, 10 Jun 2022 03:48:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzZNC-0003eZ-8G for guix-patches@gnu.org; Fri, 10 Jun 2022 03:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzZNB-0004qk-UF for guix-patches@gnu.org; Fri, 10 Jun 2022 03:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzZNB-0008Ri-PE for guix-patches@gnu.org; Fri, 10 Jun 2022 03:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Jun 2022 07:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Taiju HIGASHI Cc: 55845@debbugs.gnu.org, me@tobias.gr Received: via spool by 55845-submit@debbugs.gnu.org id=B55845.165484725532306 (code B ref 55845); Fri, 10 Jun 2022 07:48:01 +0000 Received: (at 55845) by debbugs.gnu.org; 10 Jun 2022 07:47:35 +0000 Received: from localhost ([127.0.0.1]:48584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzZMk-0008Oz-Hg for submit@debbugs.gnu.org; Fri, 10 Jun 2022 03:47:34 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:58710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzZMi-0008Oo-Vi for 55845@debbugs.gnu.org; Fri, 10 Jun 2022 03:47:33 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by michel.telenet-ops.be with bizsmtp id hKnW2700L4UW6Th06KnXMS; Fri, 10 Jun 2022 09:47:31 +0200 Message-ID: From: Maxime Devos Date: Fri, 10 Jun 2022 09:47:30 +0200 In-Reply-To: <87a6alwdvn.fsf@taiju.info> References: <20220608102124.14865-1-higashi@taiju.info> <20220608102257.15042-1-higashi@taiju.info> <87leu72sbo.fsf@taiju.info> <55fe6cdbed891707aca419ff4eedd7c37ef3eb03.camel@telenet.be> <87fskexiyc.fsf@taiju.info> <874k0uxhif.fsf@taiju.info> <5ccb68a4dc80a02baaf6d19fd782145b6b62e7b5.camel@telenet.be> <87a6alwdvn.fsf@taiju.info> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-RHvCwQ1DXBJ0WZJ8lW/P" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654847251; bh=gPhTi8+mjRl2tu5rgXKkdivavKjTM7eP4KpNyD9Bkik=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=b2y3NtiNmT5vJxfX61+zftJ593Ude8V9HEyNU8QoTunYIXPmgoJKXbLjV3eyOalrb vcjnE7so3LhSo69/VNM5xPI1FQnLOzgXeNwS9L4rrKGTDCSa4JOaRVZ9rzNrdOpAUm /mECS49uMHRxlEoPox66zBxtGXokir9SksgrFf8Scx14pzfdrF5AhZKKGfd4ugIw9B ZL1OBRM6e/KJC2nr9TyVVSG2PC7qVVTKBvnkCUC0sSLmpF+nCg6lPsLH3GqCVcQejV wQ4zguFXhlLd3qLhf7PuEYOAinimI+dyUCPHzZgFxVi8+9IDSMlmviEoKQfaj0EIsi PCrdgkdh6GVuw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654847309; 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: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=gPhTi8+mjRl2tu5rgXKkdivavKjTM7eP4KpNyD9Bkik=; b=Ae5pNO3+mZAokrdS4wFRdagwfV04kE6DJIKL/GnovIj4rFrxdxwar7zjNhqjEybz2xCb0U KVWGZEchadhIrbCu6dNqA9ewCBiijeTBvWqE2K+DkQwyfs4ys0dbl2FX/1Wx6/sxmYCofE Ca4d9n2q7/vDfV14d3OB6xUZPzDxx7EP0ETaubIpH6u628+jlLPmoizkM5QpeBzJOYoUAR K/6goEI348Fm7ZZ0PAMNwxwo5+TdW+BbIfBF/fmEInumBns2r05AQdH8sy//JgoFMkWv9e GP4xbPwRrzhRzj7NuEdD/Vq2LKuCYZgGFkOQZBezJ+Fzp98qH3JbFe47LipjxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654847309; a=rsa-sha256; cv=none; b=gUJleK2GH8eikbgQ5jNkuLsL8lY5Ap5CRU+5v7YDdxSqxKgrF9zKF1AMh/ZAvCeNlFOabB b29/S/doXD1nyjMBC3uhLwPuaN7bK04PXLXxneR/ItqgplNKKPYpqvhdi6UKm2LPucAxqC pe1PrG1G5KzZgbRUq5BDmPB2n/+nYiWNvwXulLVbjHY1BloivIDf1k/iNyBlWED/HU+/Qq EmSxa8UkyvMJ/5buDDqmP/iQewhNRkFm/gSe0HcSOtjM/LBVTgQNRJMifbZQ0NO92LMast D1b5Mp6TZoDuCIVm2L729kx54mPMV778IVMBc5AvIlsTidcKJIcuzaP1vrIR6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=b2y3NtiN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=b2y3NtiN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E8C9D36644 X-Spam-Score: 4.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: KH9yV/wzZHxo --=-RHvCwQ1DXBJ0WZJ8lW/P Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Taiju HIGASHI schreef op vr 10-06-2022 om 09:39 [+0900]: > +=C2=A0=C2=A0=C2=A0=C2=A0 (with-environment-variables > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(("PATH" ,dir)) Wait, looking at the definition of with-environment-variables, if PAGER was set when running "make check" (try "GUIX_PAGER=3Dless make check TESTS=3Dtests/ui.scm"), it will still be set when the test is run (unverified). Maybe it should be unset? Proposal: Change (match-lambda ((variable value) (setenv variable value) to (match-lambda ((variable #false) (unsetenv variable)) ((variable value) (setenv variable value) and change the with-environment-variables to (with-environment-variables `(("PATH ,dir) ("PAGER" #false) ("GUIX_PAGER" #false)) [...]). and likewise for the other tests? (string=3D? ((@@ (guix ui) find-available-pager)) "guix-pager"))))) Nitpick: find-available-pager is not an exported procedure, so due to optimisations, it can dissappear (be inlined into call-with-paginated- output-port). So to be 100% robust, it needs to be exported, or a line (set! find-avaible-pager find-available-pager) ; used in tests/ui.scm needs to be added in guix/ui.scm, or the tests needs to be adjusted to always use with-paginated-output-port instead of find-available-pager. Otherwise, tests LGTM. Greetings, Maxime. --=-RHvCwQ1DXBJ0WZJ8lW/P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqL3EhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kkUAP9jCAz++xtGHHpsixAkmFPt3Rtf xUtx6hAunPPSFicLtAD8CoeegaML7XTCaFl4iLT7+8kzV2w35bN5Q/uLz9EjFgs= =s+3y -----END PGP SIGNATURE----- --=-RHvCwQ1DXBJ0WZJ8lW/P--