From patchwork Fri Apr 11 13:54:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 41584 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F10C627BC4C; Fri, 11 Apr 2025 14:56:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CF88127BC49 for ; Fri, 11 Apr 2025 14:56:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u3Erc-00030v-7R; Fri, 11 Apr 2025 09:56:12 -0400 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 1u3ErZ-0002y3-Fj for guix-patches@gnu.org; Fri, 11 Apr 2025 09:56:09 -0400 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 1u3ErZ-0003s0-0i; Fri, 11 Apr 2025 09:56:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Q/Ab67I5C3aE19soHcWl7rJqJU9p3eqirmYrVfEQqVM=; b=i5lmdA3enM9cbL1fY//hk7MytqxRDA3duvH1A8sXBO7h6DtQ2hjaxtYCpsWPsQXaMn9u09EEw8mDI0jzHdU0GmBi9HHW+gb/7jM2OQ5i1Gh3cjupDpfAc+Zs+une/6gHOCJDRXBZRzskkUUOdaQpItbpda121To0pyKL92LLIH5Zw1tNqSMMqeg0EGn+kB/vQwXOLr6/z/gik8/sRuRJf8EEWHXO3qmrSiR665Fw4tyAsFFFFauFk9SVaQAQV+7/xnfyc22kHetg0Jr81CU8vt1P0jhAnHbJgVkAG2MaIER9pbVXiTKl1Mo0PsGTBFvPMR2hCDG4it4CSG/vNONK/Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u3ErT-0007p3-EF; Fri, 11 Apr 2025 09:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77680] [PATCH v2 1/4] cache: Remove unused import. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 13:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77680@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77680-submit@debbugs.gnu.org id=B77680.174437974429876 (code B ref 77680); Fri, 11 Apr 2025 13:56:03 +0000 Received: (at 77680) by debbugs.gnu.org; 11 Apr 2025 13:55:44 +0000 Received: from localhost ([127.0.0.1]:49893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3Er8-0007lT-Nl for submit@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57572) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3Er4-0007jN-H1 for 77680@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3Eqz-0003o0-35; Fri, 11 Apr 2025 09:55:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Q/Ab67I5C3aE19soHcWl7rJqJU9p3eqirmYrVfEQqVM=; b=IlijlwMP9Ne3KRtaRe9v qEBrsEzgfPHkTwCmSTcdBdh3gtYOSZnpJrXiLz8QeTz6ekMO2K2rjHgrtEIzeePR9FLO4bZrHdosG u6rYLxtsqcbA7oqkpim3zQwMEF3ZsklBFrukMu9t/X6YGDQwjgBqzfc9HB92PMruELpN8vhYeZA+7 zkwv0kDwaFMmhUaaqXO986KeZ6zSObZ0eC3E2f4X5p2MFa3pUQCbP2LYJsKN7fT116L6oeZ57DW8k DxLnrCKDJ7e24gpJhZBI9NC334JAzRhkfdDJLC4WbKoWjoTkreK/5VokPztlu8YuEDCl0Os3iTWPV vwVX/Ul56xVxOw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 11 Apr 2025 15:54:57 +0200 Message-ID: <103687fb70792c8e2971614c4a2d1546abad9901.1744379552.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/cache.scm: Remove unused import. Change-Id: I06956534aa5342a084ebf71b61518c515ce9288c --- guix/cache.scm | 1 - 1 file changed, 1 deletion(-) diff --git a/guix/cache.scm b/guix/cache.scm index 8b12312c77..5d8a0edbaa 100644 --- a/guix/cache.scm +++ b/guix/cache.scm @@ -18,7 +18,6 @@ ;;; along with GNU Guix. If not, see . (define-module (guix cache) - #:use-module ((guix utils) #:select (with-atomic-file-output)) #:autoload (guix build syscalls) (lock-file unlock-file) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) From patchwork Fri Apr 11 13:54:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 41582 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B8FD927BC4E; Fri, 11 Apr 2025 14:56:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6A8AC27BC49 for ; Fri, 11 Apr 2025 14:56:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u3ErZ-0002y2-Of; Fri, 11 Apr 2025 09:56:09 -0400 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 1u3ErW-0002xL-Md for guix-patches@gnu.org; Fri, 11 Apr 2025 09:56:07 -0400 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 1u3ErW-0003r6-Cu; Fri, 11 Apr 2025 09:56:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=aGeG7j1Bmh1K9z0mhsJ66S4LuOy7cbMuuYtHZrDZ4qI=; b=bSm+KDPD9lFgD6JK4YY/wknX8JtxAS9wu5plswGIq33HQ8vC5qBHPLMy6LtyUl9CdfUbv10hZm1/KagAOnrSF/PBeXrJkHAI+xaRUTCIBoePraZVEBDjCRYj8ckUN40hR8G98Jscng770fejN85n+GQOCSrfmD9QsJDnT1ZQoX3IZRaWYqKnTmBG8LofhbP66LRQQYH/B2EEi/qfPb2S7MeD8uowXuAdZ88x6JlbB9CK7i2dUKq1bRLEwdi32ABHdd5ct8G39g31tALjCLkQNnwzXYShBvXIFcZcN7nbPi9scpaqWydegK9HkAtAx6TeviqxGoXHYHAWRrP7cvYeGw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u3ErU-0007pH-DY; Fri, 11 Apr 2025 09:56:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77680] [PATCH v2 2/4] utils: Add #:sync? parameter to =?utf-8?b?4oCYd2l0aC1hdG9taWMtZmlsZS1vdXRwdXTigJku?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 13:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77680@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77680-submit@debbugs.gnu.org id=B77680.174437975329960 (code B ref 77680); Fri, 11 Apr 2025 13:56:04 +0000 Received: (at 77680) by debbugs.gnu.org; 11 Apr 2025 13:55:53 +0000 Received: from localhost ([127.0.0.1]:49929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3ErI-0007mz-5D for submit@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57574) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3Er5-0007jW-Fg for 77680@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3Er0-0003o9-6J; Fri, 11 Apr 2025 09:55:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=aGeG7j1Bmh1K9z0mhsJ66S4LuOy7cbMuuYtHZrDZ4qI=; b=p0PC9Z5oOt+d52HC19OT HJBFWnnHLPuBmDPhi11R3YKAbClbyCxjOx5Vq7vBuOWh1DnQEX2eXXOL0ZK+LdVBJQCxHFilvIU/y pHlX8JCF6/5aCv1l90U2mvP5vmi9qN4a64K1e3Aqz46bH3E0il28S2O5t0A276hx8gAerahYEKBa+ N3r3oDQhu0YiJLFNMOYz6pxs/p5uSDZF/w3iDeuxeLp5hmPIg3fCbanknRT9SdGeEtuDttODXEqH3 q6cMFRrE6ZxayLPIDDfelIB0FglFEKddFP4rJhctgRymNafoFFDxLa46k9kAUpFduwNOwvL7vqJO9 WdI4XqBInAmqcw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 11 Apr 2025 15:54:58 +0200 Message-ID: <6ad42a95eed510eecf1f9a264c24714ebe9ff2d4.1744379552.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/utils.scm (with-atomic-file-output): Add #:sync? and honor it. Add ‘force-output’ call. Change-Id: I2479778ae55360c0fab3389ac9249045a27b3568 --- guix/utils.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/guix/utils.scm b/guix/utils.scm index c7c23d9d5b..7ae98096c2 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2022, 2024 Ludovic Courtès +;;; Copyright © 2012-2022, 2024-2025 Ludovic Courtès ;;; Copyright © 2013, 2014, 2015 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2014 Ian Denhardt @@ -1057,16 +1057,22 @@ (define (call-with-temporary-directory proc) (lambda () (false-if-exception (delete-file-recursively tmp-dir)))))) -(define (with-atomic-file-output file proc) +(define* (with-atomic-file-output file proc #:key (sync? #t)) "Call PROC with an output port for the file that is going to replace FILE. Upon success, FILE is atomically replaced by what has been written to the -output port, and PROC's result is returned." +output port, and PROC's result is returned. + +When SYNC? is true, call 'fdatasync' on the temporary file before renaming it +to FILE; set it to #false for caches and temporary files to improve +performance." (let* ((template (string-append file ".XXXXXX")) (out (mkstemp! template))) (with-throw-handler #t (lambda () (let ((result (proc out))) - (fdatasync out) + (when sync? + (force-output out) + (fdatasync out)) (close-port out) (rename-file template file) result)) From patchwork Fri Apr 11 13:54:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 41583 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5F8BD27BC4B; Fri, 11 Apr 2025 14:56:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2A02727BC49 for ; Fri, 11 Apr 2025 14:56:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u3ErZ-0002y5-Oh; Fri, 11 Apr 2025 09:56:09 -0400 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 1u3ErW-0002xK-KA for guix-patches@gnu.org; Fri, 11 Apr 2025 09:56:07 -0400 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 1u3ErW-0003r4-A9; Fri, 11 Apr 2025 09:56:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Ne1HOXPWHatNbg07D1V8su4FxxAGuHIu/62yGrBWMw4=; b=DUsA4H6v3X0dOV8O+v7iOdDwmf+HaLqxJrGfOSswXHR9zrBX130AMDlSsRiAKqIdS7w83cSlk7lNugX4aL/a4t237qiA8QImzHLtv7P67T1J/B5DDhqxFjuIlOg3QI/OY3jJCEL+dwUGJUpE22AL8VdTn3xSAeQ41385b/vQWqT3FY4uejKF3+LcXakraK4g3HZJlgu3GuUuftKW/cy4mOF4tItUDFiEgYBEFoIsMSTNqfphIycjShJUaRDyUZINQfuhtadruE3PWjgYoPPA8yPI8dre1O8pwxi6DdcpCqOe8xyUj5RHB2y4t1pQx6heqoy+wgf6ClJfcklciVCCXg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u3ErV-0007pg-Tj; Fri, 11 Apr 2025 09:56:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77680] [PATCH v2 3/4] substitutes: Ignore corrupt cached narinfos. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 13:56:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77680@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77680-submit@debbugs.gnu.org id=B77680.174437975429970 (code B ref 77680); Fri, 11 Apr 2025 13:56:05 +0000 Received: (at 77680) by debbugs.gnu.org; 11 Apr 2025 13:55:54 +0000 Received: from localhost ([127.0.0.1]:49936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3ErJ-0007n9-4W for submit@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57582) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3Er6-0007kF-Md for 77680@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3Er1-0003oH-BX; Fri, 11 Apr 2025 09:55:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Ne1HOXPWHatNbg07D1V8su4FxxAGuHIu/62yGrBWMw4=; b=mFD7xSC9MHv2E+gNeflC qJyIm3GXqqHDAmdqfGUCurFfHDPBStqcpg3GPgpkE8lLBct/6TqlLMQFVirC84yRQgRH27GuLs6y8 7wI/GNuK/o41hgTJHa1FZoSlwjK/Ha/gFaiaaY++tsFqP0uLxvivwrRTFf//H1nSp9mZ0Y9x1b+H2 p81FYFqGR06eZnHj6r8s5zH48s1n2/gUAWnxLypZ/e1MXcL5XsD+QWSmZl1+UIEjCPZYKpJWZqxU9 5e5CvQnn3t06v7EwRDOWzDJ5Tkzs4oOUniUeD0aFz+Vx3AGd4i8tNg7um0ZZjS7p8XyG6HfutXiXJ DxY7Hk9Qvi0Iag==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 11 Apr 2025 15:54:59 +0200 Message-ID: <0e7a18395128304038c4ac654033321f3e32950e.1744379552.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/substitutes.scm (cached-narinfo): Add ‘eof-object?’ clause. Change-Id: I2d776f64b6521f778b4ab3f956b35cdef2ddb383 --- guix/substitutes.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/substitutes.scm b/guix/substitutes.scm index 86b9f5472a..9edce5b2f8 100644 --- a/guix/substitutes.scm +++ b/guix/substitutes.scm @@ -316,6 +316,8 @@ (define (cached-narinfo cache-url path) (values #f #f) (values #t (string->narinfo value cache-uri)))) (('narinfo ('version v) _ ...) + (values #f #f)) + ((? eof-object?) ;corrupt file (values #f #f)))))) (lambda _ (values #f #f)))) From patchwork Fri Apr 11 13:55:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 41585 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E4B5D27BC4B; Fri, 11 Apr 2025 14:56:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 94EBC27BC4D for ; Fri, 11 Apr 2025 14:56:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u3Erb-0002ys-Ni; Fri, 11 Apr 2025 09:56:11 -0400 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 1u3ErZ-0002y7-HG for guix-patches@gnu.org; Fri, 11 Apr 2025 09:56:09 -0400 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 1u3ErZ-0003s1-4I; Fri, 11 Apr 2025 09:56:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=ZNbXfyv6zSSXmyetNqAg/zXk2AZKSUrEP/ACqQlCS04=; b=fyAjiUWDU9lMcM1m0WvA2GA0zKpuQMdjIDw18jCC4lBMqQpoXapL6ukBA6KB5mZJeNpgy2OCcu+IHjSfipmX2/pVmm6X+5L4m2ioorZ03l6M/+/PTpNlAtTdJ9WTICGg2W3aR0MmYrQYQppx7BvFUn4PBHBPaOjJKv3uKDXYnieMkbxCkM6CyjFVp2NuP4mK8NXAFh+r3re2UD95b6IAAz00qSyWgbITN3e0qi+v3sGQnYi7KiRtkW/Gl/fpWNdChsD3T1f8WyNgfdoJ5GL6+LzOVNcaFvk+j1P12342H1CcAiDjcFb5KIkEUkFaMEiUZAAqqqqfQAvzq7HFB+EGuQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u3ErX-0007q2-3n; Fri, 11 Apr 2025 09:56:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77680] [PATCH v2 4/4] guix: Avoid =?utf-8?b?4oCYZmRhdGFzeW5j?= =?utf-8?b?4oCZ?= call for caches and regular files. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 13:56:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77680@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77680-submit@debbugs.gnu.org id=B77680.174437975529989 (code B ref 77680); Fri, 11 Apr 2025 13:56:07 +0000 Received: (at 77680) by debbugs.gnu.org; 11 Apr 2025 13:55:55 +0000 Received: from localhost ([127.0.0.1]:49941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3ErJ-0007nL-Qs for submit@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57590) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3Er8-0007kT-97 for 77680@debbugs.gnu.org; Fri, 11 Apr 2025 09:55:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3Er2-0003oU-88; Fri, 11 Apr 2025 09:55:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=ZNbXfyv6zSSXmyetNqAg/zXk2AZKSUrEP/ACqQlCS04=; b=aj5B2M3fhQQFyrH1+mNM gH5mxjvZqbsisKVEkj8EyCyFRj0CfWMFX0IzfUCVDLnfuwyad0fbB+YQ/wW+v3RtFU4RoCSYe4PdJ cA3ibq+mLqGHlVB+K7ByuPgWjjeFMoJlPHqkvgRW9a8YAej7y+/TdRwNRx+BUZb3VZhfyXN34Qdde x22D04A1cT5FeLi8sLtw46dgX8dVNP4CTcCLA/ttQB3Mq16uFKji29/sWRJcbcHsfIUVcPjA78t3W 4OAE0IgEip2zCnxnsWaLFzOhP9hLUW8FYs8+5vJatRC90Qvlauryg3cNY4cwxhqP9iG6p2ZWCat/g HftUQVAMG+QSzg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 11 Apr 2025 15:55:00 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Fixes . Calling ‘fdatasync’ for each and every narinfo file created by ‘guix substitute’ proved to be too expensive on spinning HDDs and/or under load (from 0.1s to 1.3s for the ‘fdatasync’ call alone). * guix/git-authenticate.scm (cache-authenticated-commit): Pass #:sync? #f. * guix/http-client.scm (http-fetch/cached): Likewise. * guix/scripts/discover.scm (write-publish-file): Likewise. * guix/scripts/style.scm (format-whole-file): Likewise. * guix/substitutes.scm (cache-narinfo!): Likewise. Reported-by: Christopher Baines Change-Id: I82297eae737bc5aae8a3f7604119e9f3d4b625bf --- guix/git-authenticate.scm | 5 +++-- guix/http-client.scm | 5 +++-- guix/scripts/discover.scm | 3 ++- guix/scripts/style.scm | 5 +++-- guix/substitutes.scm | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/guix/git-authenticate.scm b/guix/git-authenticate.scm index 37c69d0880..3cd1175c32 100644 --- a/guix/git-authenticate.scm +++ b/guix/git-authenticate.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019, 2020, 2021, 2022 Ludovic Courtès +;;; Copyright © 2019-2022, 2025 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -344,7 +344,8 @@ (define (cache-authenticated-commit key commit-id) (chmod port #o600) (display ";; List of previously-authenticated commits.\n\n" port) - (pretty-print lst port)))))) + (pretty-print lst port))) + #:sync? #f))) ;;; diff --git a/guix/http-client.scm b/guix/http-client.scm index 9138a627ac..4e0cc59e91 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2018, 2020-2022 Ludovic Courtès +;;; Copyright © 2012-2018, 2020-2022, 2025 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2012, 2015 Free Software Foundation, Inc. ;;; Copyright © 2017 Tobias Geerinckx-Rice @@ -346,7 +346,8 @@ (define* (http-fetch/cached uri #:key (ttl (%http-cache-ttl)) text? (when cache-port (close-port cache-port)) (with-atomic-file-output file - (cut write-cache port <>)) + (cut write-cache port <>) + #:sync? #f) (close-port port) (open-input-file file)))) diff --git a/guix/scripts/discover.scm b/guix/scripts/discover.scm index 32bf6085a5..cbe01638f5 100644 --- a/guix/scripts/discover.scm +++ b/guix/scripts/discover.scm @@ -87,7 +87,8 @@ (define* (write-publish-file #:key (file (%publish-file))) (format port "http://~a:~a~%" (avahi-service-address service) (avahi-service-port service))) - %publish-services))) + %publish-services)) + #:sync? #f) (chmod file #o644)) (define* (read-substitute-urls #:key (file (%publish-file))) diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index 4801529f7e..c45bdd4458 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021-2024 Ludovic Courtès +;;; Copyright © 2021-2025 Ludovic Courtès ;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. @@ -554,7 +554,8 @@ (define* (format-whole-file file order? #:rest rest) (apply pretty-print-with-comments/splice port lst #:format-comment canonicalize-comment #:format-vertical-space canonicalize-vertical-space - rest)))))) + rest)) + #:sync? #f)))) ;;; diff --git a/guix/substitutes.scm b/guix/substitutes.scm index 9edce5b2f8..24b7873ce2 100644 --- a/guix/substitutes.scm +++ b/guix/substitutes.scm @@ -127,7 +127,8 @@ (define (cache-narinfo! cache-url path narinfo ttl) (mkdir-p (dirname file)) (with-atomic-file-output file (lambda (out) - (write (cache-entry cache-url narinfo) out)))) + (write (cache-entry cache-url narinfo) out)) + #:sync? #f)) narinfo)