From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SPqSEVmb6WLr/wAAbAwnHQ (envelope-from ) for ; Tue, 02 Aug 2022 23:47:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kO2tEFmb6WIbDwAAG6o9tA (envelope-from ) for ; Tue, 02 Aug 2022 23:47:05 +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 EBD3B3D5AF for ; Tue, 2 Aug 2022 23:47:04 +0200 (CEST) Received: from localhost ([::1]:60418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIzjE-0003WY-4d for larch@yhetil.org; Tue, 02 Aug 2022 17:47:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIzhK-0001zI-WE for guix-patches@gnu.org; Tue, 02 Aug 2022 17:45:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIzhK-0006R1-MV for guix-patches@gnu.org; Tue, 02 Aug 2022 17:45:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIzhK-0003Ad-JK for guix-patches@gnu.org; Tue, 02 Aug 2022 17:45:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56898] [PATCH 12/13] installer: Render the final configuration with (guix read-print). Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Aug 2022 21:45:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56898 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56898@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 56898-submit@debbugs.gnu.org id=B56898.165947668712053 (code B ref 56898); Tue, 02 Aug 2022 21:45:06 +0000 Received: (at 56898) by debbugs.gnu.org; 2 Aug 2022 21:44:47 +0000 Received: from localhost ([127.0.0.1]:45301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIzh0-00038F-Rm for submit@debbugs.gnu.org; Tue, 02 Aug 2022 17:44:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIzgu-000364-W6 for 56898@debbugs.gnu.org; Tue, 02 Aug 2022 17:44:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIzgo-0006At-Nw; Tue, 02 Aug 2022 17:44: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=P3RQ1AuJWjp6RfoXgiAZa60MZewlUPiuWpxN5KGGu/E=; b=LTRWTmpDEhmwt+lgxvkC CsRJuipscQ/pELuggdSiLHaGwz8BXlGneT0kzB2RZKPFXf4TGqK7wZIPPBKqDQRb+FK5oCFbyTiou C3uAVMFa035JM4sx0FMQtJY8ccOo/etsgd8wl7UMI5hHSTTQj5dYi5w8F5sc2cL8ViPlQ/SRNZSPt fZvcyh30KjoeSmgmrdpRKrhW3F64vMcQx0BogHo5C2ZpLRazR5c1MyVUglBLpWsIHv9eZ8PiQTD/i F/CYUmCfGgv9L/uxT/5nbx+zj5ROkQnxxbfsCY2e+FDsK0iGjGwLtjlNMUgFK3KcjpveIaPm9Tmpc abBQhzIC346pYg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52235 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIzgo-0006W4-A6; Tue, 02 Aug 2022 17:44:34 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 2 Aug 2022 23:44:18 +0200 Message-Id: <20220802214419.19013-12-ludo@gnu.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220802214419.19013-1-ludo@gnu.org> References: <20220802214419.19013-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1659476825; 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=P3RQ1AuJWjp6RfoXgiAZa60MZewlUPiuWpxN5KGGu/E=; b=lpbPgKBs4R6Q+zfnfcDR4d0MLmi0zH21Po+wPmgudKzncstYO+YcL46oGc92xQyapQiBkC 6iNxbwxWb7CaWJtez2O8XgAxQivYHBFMqLwXD9m/LQzLWjSZiY4HZmnuwWauXHZSftEkS7 lwlCrs4NR85hAZIj/wNV5E4ZV5yLBED/1drou67WNYQWVgr0hS/FocIZobwChR9yvFWFrM TBdFwW+YHifBtwn16vzN+D0sX6KcnJx1ckFzQMpiO2h47HUT7lRDAaMN3g2+uKy4RrhoL+ dX4wkh3LCfqmJ2d5el5ZdISJLGeKmzUr+FQI+cmUyV9d4pACdDSxdv72+n7crw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659476825; a=rsa-sha256; cv=none; b=Bn/J3lVnWrO6KBQBmXrNMS8pKRgMTZsIVp4gGRVIH4SVUKIWGYswHPxqIRADg6P5OqwvA/ BGZ8J+dyYkiOsSwXtzC45oU0NNZxIX/wX6XeYmQAApKsl38Z9PdzYWCSWr4ka3BER74x3H r3HFxzjQVBBmKt/WZvtDWltPjEEclco+exmO2gEGG51ddy25gIrddy5Yj+xE1hNuQw7Ltb KfsT6gR5tnad/SWOzuDE2aUdVfzOatwIb7JwMy8zQjyiJbg1sJWsJ3zURmNUOEb9UOS9h8 OsVSuEx9GUSxmqigeEbur0dWk+PKKvWJN6G5p1Ur6pYw++dRuVsqcATNnqKypA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LTRWTmpD; dmarc=pass (policy=none) header.from=gnu.org; 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: -2.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LTRWTmpD; dmarc=pass (policy=none) header.from=gnu.org; 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: EBD3B3D5AF X-Spam-Score: -2.82 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2AAxFyzx6Q3Y * gnu/installer.scm (module-to-import?): Return #t for (guix read-print). * gnu/installer/steps.scm (configuration->file): Use 'pretty-print-with-comments/splice' instead of 'for-each' and 'pretty-print'. --- gnu/installer.scm | 3 ++- gnu/installer/steps.scm | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gnu/installer.scm b/gnu/installer.scm index 415f5a7af7..8a6e604fa5 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2020 Mathieu Othacehe -;;; Copyright © 2019, 2020 Ludovic Courtès +;;; Copyright © 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Florian Pelz ;;; @@ -63,6 +63,7 @@ (define module-to-import? (('gnu 'installer _ ...) #t) (('gnu 'build _ ...) #t) (('guix 'build _ ...) #t) + (('guix 'read-print) #t) (_ #f))) (define not-config? diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm index 8bc38181a7..f1d61a2bc5 100644 --- a/gnu/installer/steps.scm +++ b/gnu/installer/steps.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2019 Mathieu Othacehe -;;; Copyright © 2020, 2021 Ludovic Courtès +;;; Copyright © 2020-2022 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,9 +21,9 @@ (define-module (gnu installer steps) #:use-module (guix records) #:use-module (guix build utils) #:use-module (guix i18n) + #:use-module (guix read-print) #:use-module (gnu installer utils) #:use-module (ice-9 match) - #:use-module (ice-9 pretty-print) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) @@ -244,11 +244,9 @@ (define* (configuration->file configuration ;; by the graphical installer.\n") port) (newline port) - (for-each (lambda (part) - (if (null? part) - (newline port) - (pretty-print part port))) - configuration) + (pretty-print-with-comments/splice port configuration + #:max-width 75) + (flush-output-port port)))) ;;; Local Variables: -- 2.37.1