From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 26 11:20:52 2021 Received: (at submit) by debbugs.gnu.org; 26 Dec 2021 16:20:52 +0000 Received: from localhost ([127.0.0.1]:41363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1WGS-0002DU-CM for submit@debbugs.gnu.org; Sun, 26 Dec 2021 11:20:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:60172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1WGM-0002DG-WA for submit@debbugs.gnu.org; Sun, 26 Dec 2021 11:20:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1WGL-00020S-JU for guix-patches@gnu.org; Sun, 26 Dec 2021 11:20:46 -0500 Received: from [2a02:c205:2020:6054::1] (port=36664 helo=tobias.gr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1WGH-00054C-LZ for guix-patches@gnu.org; Sun, 26 Dec 2021 11:20:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=8WG/O4L+dTNPM /4t/FpzzwPK3Bm/RxTqdzz1oU89it8=; h=date:subject:to:from; d=tobias.gr; b=Dp0QOuwMc11gC5sYIB7igkjra8O+Zhd8ecGsr82RyvGiZ5NWFRckX0XVR/lpA0kM7mgV Wfp2MZyLKgLnzjPb/hykwcxUGZM63CALQX+D9K27MpsHf1WzanN9RYhNLDajNURBagjpJA izVPTFHVxVGRD86EZ2UlCwcHeqYIeZ7IwYNCI4pcvwN+18v/I7pffuLa5coH5iwR5OG84+ w202tAP9kRLsbjdVYswGmX4sWLWup55lQuQfnKlkArmZBL8fgXigVOZ68X8kSkJjLUGLCp Sj33FmTfosJwjyGUt1PYFBhhKFwSufoyCUy3oHSwhUFddKgNU/MY9YtmTCJ67MgA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 01804ee8 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Sun, 26 Dec 2021 16:20:35 +0000 (UTC) From: Tobias Geerinckx-Rice To: guix-patches@gnu.org Subject: [PATCH] =?UTF-8?q?substitute:=20Add=20a=20=E2=80=98--clear-cache?= =?UTF-8?q?=E2=80=99=20option.?= Date: Sun, 26 Dec 2021 17:21:26 +0100 Message-Id: <20211226162126.23749-1-me@tobias.gr> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:c205:2020:6054::1 (failed) Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Unlike ‘rm -rf ~/.cache/guix/substitute’ this respects XDG_CACHE_HOME. Use the --OPTION form for consistency with the existing ‘guix substitute’ interface, where other guix subcommands would prefer an ACTION. This subcommand really supports only one OPTION at a time, anyway. * guix/scripts/substitute.scm (guix-substitute): Add a new ‘--clear-cache’ option argument. (show-help): Document it. --- guix/scripts/substitute.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index c044e1d47a..1e71b4848b 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Nikita Karetnikov ;;; Copyright © 2018 Kyle Meyer ;;; Copyright © 2020 Christopher Baines +;;; Copyright © 2021 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,7 +41,7 @@ (define-module (guix scripts substitute) #:use-module (guix cache) #:use-module (gcrypt pk-crypto) #:use-module (guix pki) - #:use-module ((guix build utils) #:select (mkdir-p)) + #:use-module ((guix build utils) #:select (delete-file-recursively mkdir-p)) #:use-module ((guix build download) #:select (uri-abbreviation nar-uri-abbreviation (open-connection-for-uri @@ -239,6 +240,8 @@ (define-syntax with-networking (define (show-help) (display (G_ "Usage: guix substitute [OPTION]... Internal tool to substitute a pre-built binary to a local build.\n")) + (display (G_ " + --clear-cache forget previously cached availability information")) (display (G_ " --query report on the availability of substitutes for the store file names passed on the standard input")) @@ -749,6 +752,10 @@ (define reply-port (with-networking (with-error-handling ; for signature errors (match args + (("--clear-cache") + ;; This is meant to be a big hammer, so don't pussyfoot around with + ;; maybe-remove-expired-cache-entries. + (delete-file-recursively %narinfo-cache-directory)) (("--query") (let ((acl (current-acl))) (let loop ((command (read-line))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 27 16:12:40 2021 Received: (at 52805) by debbugs.gnu.org; 27 Dec 2021 21:12:40 +0000 Received: from localhost ([127.0.0.1]:44433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1xIN-0005Gf-Vp for submit@debbugs.gnu.org; Mon, 27 Dec 2021 16:12:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1xIL-0005GP-1D for 52805@debbugs.gnu.org; Mon, 27 Dec 2021 16:12:38 -0500 Received: from [2001:470:142:3::e] (port=42250 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1xIF-0001EB-Du; Mon, 27 Dec 2021 16:12:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=HTai3Oe2Ev1Cl9OVDyWFghZrT8QTZW+DPRos/K8f90M=; b=GF2EV6LSzcQp6bLzLE4x qBWz2ZheVnYYZPOGAakotOwUbqZ3yRiTX70+iLtZDRlvn4urHEPJcoyPPIlve7rgfwFnd+1LU6poT 5cWO+ufHkpyvmEQMqJGT+RMaJT6kROhj4MteDUXfKJmhfMqFWZpR++TWNRItp4AKyS2afwk24kTKp THSyjBWiaEtbk9RdGdqenVMVN6f6bSEiG0+ZOPpUnswhF2dIZXzoogOBcWOrOAO/dCR5Mq9kbyOek IAtvV3boRVGAZpZiP9EQu3fdnCbkxksEXbbVPJFiq14S6gXKPlE16z1PC+WCPl44Ok5Bx1f5wiM1H Qd1xSmqqmYpkKw==; Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=59788 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1xIF-00030u-G6; Mon, 27 Dec 2021 16:12:31 -0500 From: Mathieu Othacehe To: Tobias Geerinckx-Rice Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. References: <20211226162126.23749-1-me@tobias.gr> Date: Mon, 27 Dec 2021 22:12:28 +0100 In-Reply-To: <20211226162126.23749-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Sun, 26 Dec 2021 17:21:26 +0100") Message-ID: <87ee5x7nwj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52805 Cc: 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Tobias, > Unlike =E2=80=98rm -rf ~/.cache/guix/substitute=E2=80=99 this respects XD= G_CACHE_HOME. This script is invoked by the daemon as root. In that context, %narinfo-cache-directory is "/var/guix/substitute/cache", whereas when run as an user it is likely: "~/.cache/guix/substitute". That would mean that users need to run "sudo guix substitute --clear-cache". Moreover this script is an internal undocumented tool, so I'm not in favor of adding user commands to it. Maybe "guix gc" would be a better place? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 27 16:46:52 2021 Received: (at 52805) by debbugs.gnu.org; 27 Dec 2021 21:46:52 +0000 Received: from localhost ([127.0.0.1]:44474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1xpU-0006Dv-9s for submit@debbugs.gnu.org; Mon, 27 Dec 2021 16:46:52 -0500 Received: from tobias.gr ([80.241.217.52]:58716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1xpR-0006Di-PK for 52805@debbugs.gnu.org; Mon, 27 Dec 2021 16:46:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=8d0Ig9TgmPEcL lD0z4HsqwMtUQq3FlXlRPfiEHMHpzI=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=UNgMS20RLGLqgthK5zzLYvQcEDLnbU+3Fst5Hi PEH2EQxyd6wKWUuxXZVel0X5+2MPLp+yyQeoD9KgkKm8fo72arjRW3GVvVjFD5jO3umQuh URMfEmdMu5Rdp3wCDJi8gOLRZRKGoc7evwhU3P7/O98CAvww3dLf4+9fyWDLpfv8hZFzWd /ShUuAKsnoQCT66wVMt4XhPvC28Z7oSMhZfGQycU42x7tKl4whEuE2/DubE59KnDvw96NL 1NYsAcGWNBHD//MXEhnToBkZw+55WQtsCMKf3GDpRjiaZo4S+RFzb6MH6FXRN/ptGHCvtY y93XtZT6EgGFKMRskF/dwVlw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 05c8f466 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 27 Dec 2021 21:46:46 +0000 (UTC) References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> From: Tobias Geerinckx-Rice To: Mathieu Othacehe Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. Date: Mon, 27 Dec 2021 22:20:16 +0100 In-reply-to: <87ee5x7nwj.fsf@gnu.org> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87pmphhg8q.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52805 Cc: 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Mathieu, Thanks for the review! Mathieu Othacehe =E5=86=99=E9=81=93=EF=BC=9A > This script is invoked by the daemon as root. In that context, > %narinfo-cache-directory is "/var/guix/substitute/cache",=20 > whereas when > run as an user it is likely: "~/.cache/guix/substitute". Correct. > That would mean that users need to run "sudo guix substitute > --clear-cache". If they want to clear /var instead of ~/.cache, sure. That sounds like a sane interface, if clearing =E2=80=98root=E2=80=99's cac= he were=20 the intention? How would you even do that without sudo,=20 privilege-wise? > Moreover this script is an internal undocumented tool, > so I'm not in favor of adding user commands to it. OK. The point was to have a little command I could ask other users to=20 run, that's guaranteed to clear the correct directory, and doesn't=20 involve a spooky rm (which saves some back-and-forth :-). > Maybe "guix gc" would be a better place? No, I'd rather not add yet another option to =E2=80=98guix gc=E2=80=99 that= has=20 nothing to do with GC. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYco0hQ0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15d+4BAPkuQWWC+qZ1C/dkdaYx/U1PC85Yn8QdGWLVDgED STCNAQClkSgUbCbBmujSQMiP17E0ovE+2PBVu7VDCLaNfj0DAQ== =rAZY -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 29 11:58:42 2021 Received: (at 52805) by debbugs.gnu.org; 29 Dec 2021 16:58:42 +0000 Received: from localhost ([127.0.0.1]:50163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2cHi-0005Qm-7d for submit@debbugs.gnu.org; Wed, 29 Dec 2021 11:58:42 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:35804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2cHg-0005QU-PJ for 52805@debbugs.gnu.org; Wed, 29 Dec 2021 11:58:41 -0500 Received: by mail-wm1-f48.google.com with SMTP id v10-20020a05600c214a00b00345e59928eeso8215502wml.0 for <52805@debbugs.gnu.org>; Wed, 29 Dec 2021 08:58:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=jeiyTgboR4u2+lQNSnmchbQOU166sOcizBOho5weyAw=; b=dlj/Kv8eVlOi0q8cdA/FJ4Unu/qt876CWaCsfS5/rw+HVkPV1z+OLwNjr8sfDJS/r4 8Tdejutr9ifT76RgvlJPk995SrTd5rxfSNHdMANiR3pDjc5SRy+omDsPW/uBs7as5B1R j/aac+fTAomtFPXLX6fRcvHYjMWNHwzP5y1qac1NaPBsDJTvOddcZGBx2U0ApYO3IqrC nkCAY5HJZnfXJFnssWjnVHvRXeJ2ptTp60QoixFVDV/0np+RfAmt5wFio3VsqILiJF50 QSar4vKtjCXmqjXjWNxUBgVYib+itV5uYa66j4jdK3X2zlYm3zSLBaHhVV1+gn8iCa3S F6Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=jeiyTgboR4u2+lQNSnmchbQOU166sOcizBOho5weyAw=; b=j73e0yZBzEH22HmSPDlQ8uJPDGuS8hzQqTa/xFR6qNUfkvrnD9cji3Y042EnPxB88F Lib3OFF4vBl8smgjxA4NhPWaFRezbJPkVhotea5Pbg+eo7GS9MOh+OdSHrKw3M8dXTaw gSttK8uyrrRyFNTgNx1AjOPFq7CDHqhtGWbMm1xBz7dDZ6p7aKZImz1QIUVvGzkF7GXI RJhBZapqjKCZeYAbOLRPXJn9L+p8c0gy6nIDPZbUIm7TRrFIApMYLHQ5J2Sz/PU0s8PK Gplgj/fCNvH1ZpHVsdJNx9dpbhDCuGNIwL1BJik2y/4KiTDWiz3XdHfn/VKFrjm/fyBO qtHg== X-Gm-Message-State: AOAM530WYIvfIaJw548iSbzBs85EjMowsownw5EzKQuYUTXQztPGIGY5 4kgGj2THNvd+aXe4uv7x/kj7nQBV7qU= X-Google-Smtp-Source: ABdhPJxdpGQQkar8gWhz6xdQt2W3jw3HPor+ADdQECpEfF6bSE5wYPxAMJjOZn3f8F8YJb3IZUrSBw== X-Received: by 2002:a7b:c101:: with SMTP id w1mr21839498wmi.149.1640797114840; Wed, 29 Dec 2021 08:58:34 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id p13sm12767893wrs.54.2021.12.29.08.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Dec 2021 08:58:34 -0800 (PST) From: zimoun To: Tobias Geerinckx-Rice , Mathieu Othacehe Subject: Re: [bug#52805] [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cl?= =?utf-8?Q?ear-cache=E2=80=99?= option. In-Reply-To: <87pmphhg8q.fsf@nckx> References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> <87pmphhg8q.fsf@nckx> Date: Wed, 29 Dec 2021 17:49:28 +0100 Message-ID: <864k6rjqzr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52805 Cc: 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Tobias, On Mon, 27 Dec 2021 at 22:20, Tobias Geerinckx-Rice via Guix-patches via wrote: >> Maybe "guix gc" would be a better place? > > No, I'd rather not add yet another option to =E2=80=98guix gc=E2=80=99 th= at has > nothing to do with GC. Why? Well, garbage collection is about automatic memory management and cache is about efficiency of memory usage. Therefore, it is appears to me relevant to have an option =E2=80=9Cguix gc --clear-cache=E2=80=9D to fo= rce the clean of various caches. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 05 15:59:54 2022 Received: (at 52805) by debbugs.gnu.org; 5 Jan 2022 20:59:54 +0000 Received: from localhost ([127.0.0.1]:39002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5DNx-00055P-WF for submit@debbugs.gnu.org; Wed, 05 Jan 2022 15:59:54 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:44218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5DNw-000559-5b for 52805@debbugs.gnu.org; Wed, 05 Jan 2022 15:59:52 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 1188013C; Wed, 5 Jan 2022 21:59:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GXoJeGDv3dLT; Wed, 5 Jan 2022 21:59:45 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 0CE36112; Wed, 5 Jan 2022 21:59:44 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> <87pmphhg8q.fsf@nckx> Date: Wed, 05 Jan 2022 21:59:44 +0100 In-Reply-To: <87pmphhg8q.fsf@nckx> (Tobias Geerinckx-Rice's message of "Mon, 27 Dec 2021 22:20:16 +0100") Message-ID: <87czl5kif3.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 1188013C X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 52805 Cc: Mathieu Othacehe , 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Tobias Geerinckx-Rice skribis: > Mathieu Othacehe =E5=86=99=E9=81=93=EF=BC=9A [...] >> Moreover this script is an internal undocumented tool, >> so I'm not in favor of adding user commands to it. +1 > The point was to have a little command I could ask other users to run, > that's guaranteed to clear the correct directory, and doesn't involve > a spooky rm (which saves some back-and-forth :-). In which case do users have to =E2=80=98rm -rf ~/.cache/guix/substitute=E2= =80=99? That directory is only used by =E2=80=98guix weather=E2=80=99. In that cas= e, =E2=80=98--clear-cache=E2=80=99 could be added to =E2=80=98guix weather=E2= =80=99 maybe? Now, ideally there would not be any cache-related option because the cache would always be valid. If it=E2=80=99s not, it would be nice to see = how that can be improved or mitigated. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 05 17:59:03 2022 Received: (at 52805) by debbugs.gnu.org; 5 Jan 2022 22:59:03 +0000 Received: from localhost ([127.0.0.1]:39255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5FFG-0001zH-Qs for submit@debbugs.gnu.org; Wed, 05 Jan 2022 17:59:03 -0500 Received: from tobias.gr ([80.241.217.52]:60172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5FFE-0001ye-Kz for 52805@debbugs.gnu.org; Wed, 05 Jan 2022 17:59:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=UKq3WnLETkCza QB36nHYJNhoRmBei94vAzp53pdb4ts=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=a1q3unLkZnrjdMyiEWg0Rc1swQXz0vm0ZQN+AC kjYAoh8spjctm8g+Qx+djQgxts19e465i/kLxj1w+pvuQuykI4Mkua/pPqEId3iAEu2KF6 2F5oU8ERAdDRrxm4Wrn5hF/BO8bOW1rydE6iO1/UIdnw69RbX8BTAriR6nRxYcqskmW/65 IghmjGZjyOVp2lP0IL7DuQ+NehzAFTcUl6N2S1qEffKp32ydkG2UNuYD28SUX9nqpjsukj yaQ1Pf14q8bofFq97r4cCIsAvMnRhuTeHeF3+0o/qcNayo4z0E9hi7zUsM11XvOWWmTMsN tdLA+Z40VeeCHvAGDUCguCJg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 9482a7ed (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 5 Jan 2022 22:58:56 +0000 (UTC) References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> <87pmphhg8q.fsf@nckx> <87czl5kif3.fsf_-_@gnu.org> From: Tobias Geerinckx-Rice To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. Date: Wed, 05 Jan 2022 23:41:58 +0100 In-reply-to: <87czl5kif3.fsf_-_@gnu.org> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87o84phjpo.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52805 Cc: Mathieu Othacehe , 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Ludo'! Ludovic Court=C3=A8s =E5=86=99=E9=81=93=EF=BC=9A > That directory is only used by =E2=80=98guix weather=E2=80=99. Let me back up then: why does =E2=80=98guix weather=E2=80=99 cache response= s at=20 all? Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYdYi8w0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15RyoBAJXhrl/4QD7nxisNCDj34S446bMNV1+eEIvr6gcG 2905AP0QuZVQwkNjMGPKWQZ11iS6Q4fYbTSyhEwYO82X2MfNCg== =1n7x -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 11 07:47:44 2022 Received: (at 52805) by debbugs.gnu.org; 11 Jan 2022 12:47:44 +0000 Received: from localhost ([127.0.0.1]:54373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7GYy-0002es-FX for submit@debbugs.gnu.org; Tue, 11 Jan 2022 07:47:44 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:49746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7GYv-0002dz-WF for 52805@debbugs.gnu.org; Tue, 11 Jan 2022 07:47:43 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9016D678; Tue, 11 Jan 2022 13:47:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fW2fvYh-xZZn; Tue, 11 Jan 2022 13:47:35 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 85D545FE; Tue, 11 Jan 2022 13:47:34 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> <87pmphhg8q.fsf@nckx> <87czl5kif3.fsf_-_@gnu.org> <87o84phjpo.fsf@nckx> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?utf-8?Q?Niv=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 11 Jan 2022 13:47:33 +0100 In-Reply-To: <87o84phjpo.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 05 Jan 2022 23:41:58 +0100") Message-ID: <87sftuv3q2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 9016D678 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 52805 Cc: Mathieu Othacehe , 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Tobias Geerinckx-Rice skribis: > Ludovic Court=C3=A8s =E5=86=99=E9=81=93=EF=BC=9A >> That directory is only used by =E2=80=98guix weather=E2=80=99. > > Let me back up then: why does =E2=80=98guix weather=E2=80=99 cache respon= ses at all? For the same reason as =E2=80=98guix substitute=E2=80=99: caching allows it= to send only requests for which it doesn=E2=80=99t already know the answer. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 11 13:19:29 2022 Received: (at 52805) by debbugs.gnu.org; 11 Jan 2022 18:19:29 +0000 Received: from localhost ([127.0.0.1]:55505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7Ljs-00035O-5F for submit@debbugs.gnu.org; Tue, 11 Jan 2022 13:19:29 -0500 Received: from tobias.gr ([80.241.217.52]:33610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7Ljm-00034x-Hm for 52805@debbugs.gnu.org; Tue, 11 Jan 2022 13:19:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=tGVmDL7ui4uLS nz6DNMChWiBypaj9EEqcbH8xDPqd2s=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=e0UDwqNiWWS0SDv+qtD4bNynL7wBKaPtS4ezWx qahSi1xu0ukXe29XiBn/bGSY2F9tuPFsidhaYywsWXIkgFBPA/QBPIeXezf95pMmPw++3E OByAMvTi6p1eXF9aEIXxht0oAAVMNbmx3VM/455JFwOwls2q+/kalotssjai27XpClu7Wv M8h5yTCTCp16D6JXON9mEXlKw856vXYf5fzQic0QO+IPpl+XsEokCv6oyx2JDSMgKhs+5C MGW9kbrpiA2R11FlRNlhME1MjszfaZX3U+GkGHIDO2BvjBmx9G7jqDcpXC0IFzxCDPmeYR dTP6BRR+x9J259hzyxR5ec/Q== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 53ba7bfd (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 11 Jan 2022 18:19:10 +0000 (UTC) References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> <87pmphhg8q.fsf@nckx> <87czl5kif3.fsf_-_@gnu.org> <87o84phjpo.fsf@nckx> <87sftuv3q2.fsf@gnu.org> From: Tobias Geerinckx-Rice To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. Date: Tue, 11 Jan 2022 19:00:19 +0100 In-reply-to: <87sftuv3q2.fsf@gnu.org> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87a6g2qgo0.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52805 Cc: Mathieu Othacehe , 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hiya Ludo', Ludovic Court=C3=A8s =E5=86=99=E9=81=93=EF=BC=9A > For the same reason as =E2=80=98guix substitute=E2=80=99: caching allows = it to=20 > send only > requests for which it doesn=E2=80=99t already know the answer. Thanks! The problem is this reason doesn't make sense. N.B. I agree it's an acceptable trade-off for =E2=80=98guix substitute=E2= =80=99,=20 which has different operating parameters. When I run =E2=80=98guix weather=E2=80=99 twice in a row, I am *never* inte= rested=20 in reviewing the stale numbers I got the first time (or worse: a=20 mix of stale and new numbers). I don't care if the data is very=20 fresh: I am asking for fresher. Caching is never to my advantage: it is =E2=80=98saving=E2=80=99 only the w= ork I=20 asked it to perform, against my wishes. =E2=80=98Look how fast I fed you=20 possibly bogus data against your will!=E2=80=99 is not an impressive=20 boast. Is my concern clear? Reasonable? Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYd3KHw0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15/JsBAMQ2T769JEx/ZicPgMp8iMj99AH0oY3bXRseZiIL L7uAAP9s6l7GmK4J/hEi3cgfN3lvAsorfsH8VIPNGFzMUdifCw== =RT/V -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 12 16:04:58 2022 Received: (at 52805) by debbugs.gnu.org; 12 Jan 2022 21:04:58 +0000 Received: from localhost ([127.0.0.1]:59266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7knZ-0006Zg-Ou for submit@debbugs.gnu.org; Wed, 12 Jan 2022 16:04:58 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:37182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7knW-0006ZQ-3G for 52805@debbugs.gnu.org; Wed, 12 Jan 2022 16:04:48 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id A6E36545; Wed, 12 Jan 2022 22:04:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qAmOEBp8U0_M; Wed, 12 Jan 2022 22:04:38 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 63093353; Wed, 12 Jan 2022 22:04:38 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: bug#52805: [PATCH] substitute: Add a =?utf-8?Q?=E2=80=98--cle?= =?utf-8?Q?ar-cache=E2=80=99?= option. References: <20211226162126.23749-1-me@tobias.gr> <87ee5x7nwj.fsf@gnu.org> <87pmphhg8q.fsf@nckx> <87czl5kif3.fsf_-_@gnu.org> <87o84phjpo.fsf@nckx> <87sftuv3q2.fsf@gnu.org> <87a6g2qgo0.fsf@nckx> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 =?utf-8?Q?Niv=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 12 Jan 2022 22:04:37 +0100 In-Reply-To: <87a6g2qgo0.fsf@nckx> (Tobias Geerinckx-Rice's message of "Tue, 11 Jan 2022 19:00:19 +0100") Message-ID: <87v8yopswq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: A6E36545 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 52805 Cc: Mathieu Othacehe , 52805@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Tobias Geerinckx-Rice skribis: > Caching is never to my advantage: it is =E2=80=98saving=E2=80=99 only the= work I asked > it to perform, against my wishes. =E2=80=98Look how fast I fed you possi= bly > bogus data against your will!=E2=80=99 is not an impressive boast. > > Is my concern clear? Reasonable? It=E2=80=99s clear, but I=E2=80=99m not sure it=E2=80=99s reasonable. :-) When do you have to worry about caches? =E2=80=98guix weather=E2=80=99 can cache negative replies (404s) for %narinfo-negative-ttl =3D 10mn, unless the server provides a different =E2=80=98Cache-Control=E2=80=99 TTL. So there=E2=80=99s a possibility that= during that time window it=E2=80=99ll tell you =E2=80=9Cnope=E2=80=9D when in fact the thing= has just arrived. I think that=E2=80=99s acceptable (there=E2=80=99s a slight delay but nothi= ng=E2=80=99s =E2=80=9Cbogus=E2=80=9D), and it=E2=80=99s kind to server admins. (It=E2=80=99s possible for admins to run =E2=80=98guix publish --negative-t= tl=3D0=E2=80=99 if they don=E2=80=99t mind extra traffic from users.) That said, if you find it sufficiently annoying, what about adding =E2=80=98--clear-cache=E2=80=99 to =E2=80=98guix weather=E2=80=99? HTH! Ludo=E2=80=99.