From patchwork Mon Apr 1 20:25:19 2024 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: 62448 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 A9BDC27BBE9; Mon, 1 Apr 2024 21:27:36 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 D7FD127BBE2 for ; Mon, 1 Apr 2024 21:27:34 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrOFc-00005B-GW; Mon, 01 Apr 2024 16:27:29 -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 1rrOFG-0008UR-PE for guix-patches@gnu.org; Mon, 01 Apr 2024 16:27: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 1rrOFG-0006xf-Dg; Mon, 01 Apr 2024 16:27:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrOFC-0007LI-Pg; Mon, 01 Apr 2024 16:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70132] [PATCH 07/11] utils: =?utf-8?b?RG9u4oCZdA==?= re-export =?utf-8?q?=E2=80=98call-with-temporary-output-file=E2=80=99=2E?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, julien@lepiller.eu, lars@6xq.net, ludo@gnu.org, marius@gnu.org, othacehe@gnu.org, me@bonfacemunyoki.com, rekado@elephly.net, sharlatanus@gmail.com, zimon.toutoune@gmail.com, tanguy@bioneland.org, me@tobias.gr, jgart@dismail.de, pukkamustard@posteo.net, guix-patches@gnu.org Resent-Date: Mon, 01 Apr 2024 20:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70132 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70132@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Julien Lepiller , Lars-Dominik Braun , Ludovic =?utf-8?q?Court=C3=A8s?= , Marius Bakke , Mathieu Othacehe , Munyoki Kilyungi , Ricardo Wurmus , Sharlatan Hellseher , Simon Tournier , Tanguy Le Carrour , Tobias Geerinckx-Rice , jgart , pukkamustard X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Julien Lepiller , Lars-Dominik Braun , Ludovic =?utf-8?q?Court=C3=A8s?= , Marius Bakke , Mathieu Othacehe , Munyoki Kilyungi , Ricardo Wurmus , Sharlatan Hellseher , Simon Tournier , Tanguy Le Carrour , Tobias Geerinckx-Rice , jgart , pukkamustard Received: via spool by 70132-submit@debbugs.gnu.org id=B70132.171200317128134 (code B ref 70132); Mon, 01 Apr 2024 20:27:02 +0000 Received: (at 70132) by debbugs.gnu.org; 1 Apr 2024 20:26:11 +0000 Received: from localhost ([127.0.0.1]:51725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrOEL-0007Jb-PW for submit@debbugs.gnu.org; Mon, 01 Apr 2024 16:26:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrOEJ-0007Gb-26 for 70132@debbugs.gnu.org; Mon, 01 Apr 2024 16:26:08 -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 1rrOE6-0006na-Gb; Mon, 01 Apr 2024 16:25:58 -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=xsYU+hhTBacQmxiR+Rpns5bzsOe5xNTZcjdpL+PMt94=; b=hXNvzIoAXsMsaLuZxJot 7DCUl2nmuiO5KQzzSDOc63qGy7tyErrVpAzg9vzO8wfSLP2Qza3QYobUbsgeLvaQomyCFWMLybLPK pVez3LxyJnJJr8YkFlFC6eOY/bpVkykhPLy8dv0RTwE+QEE6AxUAlAYgDaB8Mt9TNjD4DJOzQ0TSJ bfa3nOHS3sWRlEGeGLIq0QVH6wCApCacc8BIvfPF7txAjtW0eUPgOKswNK5Hh05rWjJTh1DdxrIg6 kQGu+FANdksT7FwbnHyCc3mrUI47mPZY5mDCn6x8nWn6vWoZM5Xzx/NLHwK4n/Ve3MTMywN6+tCKW 3gUgJCZs5J6rpQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 1 Apr 2024 22:25:19 +0200 Message-ID: <0347e5d07c684f680ae2e983b3b44830cbcd74a5.1712002698.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.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: Remove re-export of ‘call-with-temporary-output-file’. Autoload a number of modules. * guix/download.scm, guix/import/hackage.scm, guix/import/hexpm.scm, guix/import/opam.scm, guix/import/pypi.scm, tests/cpio.scm, tests/egg.scm, tests/opam.scm, tests/publish.scm, tests/store-database.scm, tests/utils.scm: Adjust imports accordingly. Change-Id: I3f5e94631397996a30be2ea4ff8b50a3371e8ee7 --- guix/download.scm | 2 +- guix/import/hackage.scm | 4 ++-- guix/import/hexpm.scm | 7 ++++--- guix/import/opam.scm | 7 ++++--- guix/import/pypi.scm | 5 +++-- guix/utils.scm | 17 ++++++++--------- tests/cpio.scm | 6 +++--- tests/egg.scm | 5 +++-- tests/opam.scm | 5 +++-- tests/publish.scm | 5 +++-- tests/store-database.scm | 6 +++--- tests/utils.scm | 3 ++- 12 files changed, 39 insertions(+), 33 deletions(-) diff --git a/guix/download.scm b/guix/download.scm index 3dfe143e9f..192c47f113 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -31,7 +31,7 @@ (define-module (guix download) #:autoload (guix build download) (url-fetch) #:use-module (guix monads) #:use-module (guix gexp) - #:use-module (guix utils) + #:autoload (guix build utils) (call-with-temporary-output-file) #:use-module (web uri) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index bbaee73a06..79a51d3300 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2019 Simon Tournier ;;; Copyright © 2022 Hartmut Goebel -;;; Copyright © 2023 Ludovic Courtès +;;; Copyright © 2023-2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,7 +47,7 @@ (define-module (guix import hackage) #:use-module (guix upstream) #:use-module (guix packages) #:autoload (guix build-system haskell) (hackage-uri) - #:use-module ((guix utils) #:select (call-with-temporary-output-file)) + #:autoload (guix build utils) (call-with-temporary-output-file) #:export (%hackage-url hackage->guix-package hackage-recursive-import diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 628a44ff24..71a54ba973 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Cyril Roelandt ;;; Copyright © 2016 David Craven -;;; Copyright © 2017, 2019-2021 Ludovic Courtès +;;; Copyright © 2017, 2019-2021, 2024 Ludovic Courtès ;;; Copyright © 2019 Martin Becze ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2020-2022 Hartmut Goebel @@ -28,10 +28,11 @@ (define-module (guix import hexpm) #:use-module ((guix build utils) #:select ((package-name->name+version . hyphen-package-name->name+version) - dump-port)) + dump-port + call-with-temporary-output-file)) #:use-module (guix packages) #:use-module (guix upstream) - #:use-module (guix utils) + #:autoload (guix utils) (version>? file-sans-extension) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) diff --git a/guix/import/opam.scm b/guix/import/opam.scm index 86e82cde59..a7f8092507 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -31,7 +31,9 @@ (define-module (guix import opam) #:use-module ((srfi srfi-26) #:select (cut)) #:use-module (srfi srfi-34) #:use-module ((web uri) #:select (string->uri uri->string)) - #:use-module ((guix build utils) #:select (dump-port find-files mkdir-p)) + #:use-module ((guix build utils) + #:select (dump-port find-files mkdir-p + call-with-temporary-output-file)) #:use-module (guix build-system) #:use-module (guix i18n) #:use-module (guix diagnostics) @@ -39,8 +41,7 @@ (define-module (guix import opam) #:use-module (guix packages) #:use-module (guix upstream) #:use-module ((guix utils) #:select (cache-directory - version>? - call-with-temporary-output-file)) + version>?)) #:use-module ((guix import utils) #:select (beautify-description guix-hash-url recursive-import diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 1a3070fb36..6719fde330 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2015 Cyril Roelandt -;;; Copyright © 2015-2017, 2019-2023 Ludovic Courtès +;;; Copyright © 2015-2017, 2019-2024 Ludovic Courtès ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2018, 2023 Ricardo Wurmus ;;; Copyright © 2019 Maxim Cournoyer @@ -52,7 +52,8 @@ (define-module (guix import pypi) #:select ((package-name->name+version . hyphen-package-name->name+version) find-files - invoke)) + invoke + call-with-temporary-output-file)) #:use-module (guix import utils) #:use-module (guix import json) #:use-module (json) diff --git a/guix/utils.scm b/guix/utils.scm index 29ad09d9f7..d8ce6ed886 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2022 Ludovic Courtès +;;; Copyright © 2012-2022, 2024 Ludovic Courtès ;;; Copyright © 2013, 2014, 2015 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2014 Ian Denhardt @@ -47,11 +47,12 @@ (define-module (guix utils) #:use-module (rnrs io ports) ;need 'port-position' etc. #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!)) #:use-module (guix memoization) - #:use-module ((guix build utils) - #:select (dump-port mkdir-p delete-file-recursively - call-with-temporary-output-file %xz-parallel-args)) - #:use-module ((guix build syscalls) #:select (mkdtemp! fdatasync)) - #:use-module ((guix combinators) #:select (fold2)) + #:autoload (guix build utils) (dump-port + mkdir-p + delete-file-recursively + %xz-parallel-args) + #:autoload (guix build syscalls) (mkdtemp! fdatasync) + #:autoload (guix combinators) (fold2) #:use-module (guix diagnostics) ;, &error-location, etc. #:use-module (ice-9 format) #:use-module ((ice-9 iconv) #:prefix iconv:) @@ -76,9 +77,7 @@ (define-module (guix utils) &fix-hint fix-hint? - condition-fix-hint - - call-with-temporary-output-file) + condition-fix-hint) #:export (strip-keyword-arguments default-keyword-arguments substitute-keyword-arguments diff --git a/tests/cpio.scm b/tests/cpio.scm index 832101d1bb..35a704822b 100644 --- a/tests/cpio.scm +++ b/tests/cpio.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2022 Ludovic Courtès +;;; Copyright © 2015, 2022, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,8 +19,8 @@ (define-module (test-cpio) #:use-module (guix cpio) #:use-module (guix tests) - #:use-module ((guix build utils) #:select (which)) - #:use-module ((guix utils) #:select (call-with-temporary-output-file)) + #:use-module ((guix build utils) + #:select (which call-with-temporary-output-file)) #:use-module (ice-9 match) #:use-module (ice-9 popen) #:use-module (rnrs io ports) diff --git a/tests/egg.scm b/tests/egg.scm index a7d3378dd7..c74f954683 100644 --- a/tests/egg.scm +++ b/tests/egg.scm @@ -24,8 +24,9 @@ (define-module (test-eggs) #:use-module (gcrypt hash) #:use-module (guix tests) #:use-module ((guix build syscalls) #:select (mkdtemp!)) - #:use-module ((guix build utils) #:select (delete-file-recursively mkdir-p which)) - #:use-module ((guix utils) #:select (call-with-temporary-output-file)) + #:use-module ((guix build utils) + #:select (delete-file-recursively mkdir-p which + call-with-temporary-output-file)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-64) #:use-module (web uri) diff --git a/tests/opam.scm b/tests/opam.scm index 832fea1d9b..f444ef302e 100644 --- a/tests/opam.scm +++ b/tests/opam.scm @@ -24,8 +24,9 @@ (define-module (test-opam) #:use-module (gcrypt hash) #:use-module (guix tests) #:use-module ((guix build syscalls) #:select (mkdtemp!)) - #:use-module ((guix build utils) #:select (delete-file-recursively mkdir-p which)) - #:use-module ((guix utils) #:select (call-with-temporary-output-file)) + #:use-module ((guix build utils) + #:select (delete-file-recursively mkdir-p which + call-with-temporary-output-file)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-64) #:use-module (web uri) diff --git a/tests/publish.scm b/tests/publish.scm index efb5698bed..d5ec3c954f 100644 --- a/tests/publish.scm +++ b/tests/publish.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson ;;; Copyright © 2020 by Amar M. Singh -;;; Copyright © 2016-2022 Ludovic Courtès +;;; Copyright © 2016-2022, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,7 +25,8 @@ (define-module (test-publish) #:use-module (guix scripts publish) #:use-module (guix tests) #:use-module (guix config) - #:use-module (guix utils) + #:use-module ((guix utils) #:select (call-with-temporary-directory)) + #:use-module ((guix build utils) #:select (call-with-temporary-output-file)) #:use-module (gcrypt hash) #:use-module (guix store) #:use-module (guix derivations) diff --git a/tests/store-database.scm b/tests/store-database.scm index d8f3ce8070..0f44d33191 100644 --- a/tests/store-database.scm +++ b/tests/store-database.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès +;;; Copyright © 2017-2018, 2020-2021, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,9 +21,9 @@ (define-module (test-store-database) #:use-module (guix store) #:use-module (guix store database) #:use-module (guix build store-copy) - #:use-module ((guix utils) #:select (call-with-temporary-output-file)) #:use-module ((guix build utils) - #:select (mkdir-p delete-file-recursively)) + #:select (mkdir-p delete-file-recursively + call-with-temporary-output-file)) #:use-module (srfi srfi-26) #:use-module (srfi srfi-64)) diff --git a/tests/utils.scm b/tests/utils.scm index 52f3b58ede..462e43e2b1 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2012-2021, 2024 Ludovic Courtès ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier @@ -25,6 +25,7 @@ (define-module (test-utils) #:use-module ((guix config) #:select (%gzip)) #:use-module (guix utils) + #:use-module ((guix build utils) #:select (call-with-temporary-output-file)) #:use-module ((guix store) #:select (%store-prefix store-path-package-name)) #:use-module ((guix search-paths) #:select (string-tokenize*)) #:use-module (srfi srfi-1)