From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WM7TBdPUfmEOKwEAgWs5BA (envelope-from ) for ; Sun, 31 Oct 2021 18:39:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8ERlAdPUfmEAIwAAbx9fmQ (envelope-from ) for ; Sun, 31 Oct 2021 17:39:31 +0000 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 C57572C440 for ; Sun, 31 Oct 2021 18:39:30 +0100 (CET) Received: from localhost ([::1]:44434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhEnp-00029O-HP for larch@yhetil.org; Sun, 31 Oct 2021 13:39:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhEnO-00028w-SO for guix-patches@gnu.org; Sun, 31 Oct 2021 13:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhEnO-000364-E5 for guix-patches@gnu.org; Sun, 31 Oct 2021 13:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhEnO-0007Ie-8I for guix-patches@gnu.org; Sun, 31 Oct 2021 13:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50873] [PATCH 0/5] Fixes to =?UTF-8?Q?=E2=80=98guix?= home =?UTF-8?Q?import=E2=80=99?= Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Oct 2021 17:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50873 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Oleg Pykhalov , 50873@debbugs.gnu.org, Andrew Tropin Received: via spool by 50873-submit@debbugs.gnu.org id=B50873.163570193828049 (code B ref 50873); Sun, 31 Oct 2021 17:39:02 +0000 Received: (at 50873) by debbugs.gnu.org; 31 Oct 2021 17:38:58 +0000 Received: from localhost ([127.0.0.1]:33053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhEnK-0007IL-4r for submit@debbugs.gnu.org; Sun, 31 Oct 2021 13:38:58 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:43594 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhEnH-0007I8-OR for 50873@debbugs.gnu.org; Sun, 31 Oct 2021 13:38:56 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635701929; bh=uQb72NpYKp5/ke1xhJpYhktatfNrfRAjbWsnyK9p5AA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=F2i3dKuFdqonWZSorOn7aKR/Ls82nylA5skGDYDPJhHCYwNDktZXzo4tgQUPgGHco x4Z3cOV0NHV5vPAVSgm4X2mrksX6o5/liSF0BzYVHZWTABSRIyIOaBlTyjII7P0NxX VIlON2FgpWQnA09Alsz6W5ZSWzmvdRqxF0TR25rA= In-Reply-To: <8735oirub9.fsf_-_@gnu.org> References: <8735oirub9.fsf_-_@gnu.org> Date: Sun, 31 Oct 2021 18:38:37 +0100 Message-ID: <878ry96qn6.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635701970; 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=z5Y1ZSvz2tE1qLQhpdG7RXZVpDAz5Ih+v32/q3kRLKY=; b=lZy6x2vrn5b65g0BRSOX56JaTieqqW1w6PJp6cgHLezsm/xiX+2mA5EWN63h7iDS1wiUcg IJtULk2sLYE+9nVwLM9W80wnxl7bPQNynHVNycV6UoAofk7de/UYq62ejNSf0gEGh29s99 fs/GgZ14/+RNHjBPwKN8pi2WZbeTkmG4gigXArvQr4L3vNj0NTrASSUaJHtvoI/mSAPGXi FxbEtrFidwVTJhucBSJRL3vdPdJSJyvsmHhv8FmMuog9ln4fZMJc0RJIevxomOYT6+8eRa FaSrQ0awI0Kpdb4CsIP5FgUIhrUiPwD4Xg+YPT/4KxxVirssPw0vwqWBu1qzuA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635701970; a=rsa-sha256; cv=none; b=cAo9OasOS3lYkikgctFKBzT6wlQTlL7zKQOmveBMJ/W06v+YN0zgs+bjTOjc2EbSnjb9nw 1qwXXrRBQa3SE7EJkt21fkoTIZv10FH45xsIJ+8klGaYeZf2wHQ7rifzoLw5xkgwJLnkvz nfPIN1TpTio+Med6i7rRGIYf6jVDVwojthMQp++7Wi5C9PLE6h2NjLmx6d0o77VwduOoMi g8mJB9R+jXbbaa9ixX5t0SYG4oCKEhke5m0J9mflYyZnmZiua544eKhFQqJ8M92CU1OtoP c3BoyNTdn/SZ4BUMnhlMMXEkbPCdO6xCOtJ+j5bvWNtN6Seo7Emk6egobaHJfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=F2i3dKuF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=F2i3dKuF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C57572C440 X-Spam-Score: -0.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3e34lEwc59x+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Sun, Oct 31 2021, Ludovic Court=C3=A8s wrote: > Hi! > > Xinglu Chen skribis: > >> guix home: import: Make the user to specify a destination directory. >> guix home: import: Allow multiple modules to be imported for each >> service. >> guix home: import: Fix module name for Bash service. >> guix home: import: Don=E2=80=99t use 'slurp-file-gexp'. >> guix home: import: Delete duplicate modules when importing. >> doc: Document the =E2=80=98guix home import=E2=80=99 subcommand. >> Add tests for =E2=80=98guix home import=E2=80=99. >> guix home: import: Call =E2=80=98local-file=E2=80=99 with =E2=80=98nam= e=E2=80=99 argument. > > That=E2=80=99s a nice improvement. In the interest of moving forward, I = applied > the whole series and followed up with a few changes: > > c4ac8cf4f6 doc: Mention 'guix home reconfigure' upfront. > 971a69d8e3 doc: Avoid misuse of @ref. > 7711a6c3f4 doc: Mention "guix home import" upfront. > 6f4ca78761 home: import: Avoid duplication of 'manifest->code'. > 96728c54df home: import: Factorize triplicated 'version-spec' procedure. > f3933ae40d home: import: Clarify "destination directory". > 341fba217f home: import: Compare procedures with 'eq?'. > > Part of it is about removing duplicated code, in particular > =E2=80=98manifest->code=E2=80=99. It=E2=80=99s important to factorize no= n-trivial code like > this. > > The last commits improve documentation so users learn about =E2=80=98guix= home > import=E2=80=99 when they get started. Thanks for taking care of this! > It=E2=80=99s really nice to have this tool! I find it perhaps a bit conf= using > to have to specify a target directory to =E2=80=98guix home import=E2=80= =99; simply > trying to document it shows that it=E2=80=99s non-obvious. > > I wonder if the argument should be optional (in which case the files > wouldn=E2=80=99t be copied). But then people are likely to run into the > problems this addresses. Yeah, that could be a bit confusing for people. > Or perhaps it would be more consistent to have: > > guix home import ~/foo > > create ~/foo/config.scm, instead of printing it to stdout? > > The documentation would be clearer: =E2=80=9Cpopulate ~/foo with all the > configuration files of your home environment.=E2=80=9D Thoughts? I originally made it to print to stdout because that=E2=80=99s what the =E2= =80=98guix import=E2=80=99 commands do, but it could make sense to just populate a file directly. I don=E2=80=99t really have a strong opinion on this, so if nobo= dy has any objections, I could send a patch for this. :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmF+1J0VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x53s8P/087exvVYy0pcgXX0bbUOMHfsEV5 TIzKlQ+qraX1HFwvXHImEH1hcxTUlgDE/xPXTQ31yDdxR4HJMOIOzY0Jep57YNwv 5Pv9vJn+qOQL6regmlqzyKZNmYTFbQZtS2M7p6RTApKLZZl2HkpZbwV6Lt0oGyVA dnRhBfxPjm1m7rBMEInaReCNefLTrKM+Np4XiZodXZwdydmdKNEnz5rdX+eysKtc CEDm3NVH3GlOqlybpnaWDbPIBUagqSNRTRMf9i1VGsAsGcOSiqFidh+5OtpNdUb3 +eIr+CqJp0DbzsrvxOOR27+zCmBrh/fjbsktDd7E3OC4yEZSuM0TPy9u+BxkFZG3 kdBEQIwdlPOnKPnTvIzAr7FdggR/oyH1ESEtEMKRi66rgnVGnw/MqCygo9tb2iMA 5s4mRQZJF2yuc6cyPbnke05oySk1fb3IWYPivjkqwmBVKFRPXGcLdYXeFVyKgXi3 +SeYSC12ZCvoQI8V2lAdXOcm8IM8HguvNft3UCtiNLfj7SAmjkc38r6bvQSaIAXD wKMKmovlDHkscTptQAkEwHGESL1w05s1KAeUzcNWZuu4wwPm/TkPoENuAocSBqlm jq8FvaJ0A8/ly8CCRaZe0OoNxT7u+v0NAU1/FDnwngKv7hUP4ab3HKAGRaNu9I4o CVtX0fXFlw8sxoO1 =IqCp -----END PGP SIGNATURE----- --=-=-=--