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 ms11 with LMTPS id KHWwESwAl1+vZAAA0tVLHw (envelope-from ) for ; Mon, 26 Oct 2020 16:58:20 +0000 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 kKGiDSwAl18POgAAbx9fmQ (envelope-from ) for ; Mon, 26 Oct 2020 16:58:20 +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 C39BB9403A0 for ; Mon, 26 Oct 2020 16:58:19 +0000 (UTC) Received: from localhost ([::1]:58298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX5p4-0001DA-Ob for larch@yhetil.org; Mon, 26 Oct 2020 12:58:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX5oo-00018R-JI for guix-patches@gnu.org; Mon, 26 Oct 2020 12:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX5oo-0005Sg-8l for guix-patches@gnu.org; Mon, 26 Oct 2020 12:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX5oo-0006A0-7R for guix-patches@gnu.org; Mon, 26 Oct 2020 12:58:02 -0400 Subject: bug#44130: [PATCH] Add a recursive version of mkdir-p Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Mon, 26 Oct 2020 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 44130 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: divoplade Cc: 44130-done@debbugs.gnu.org Mail-Followup-To: 44130@debbugs.gnu.org, ludo@gnu.org, d@divoplade.fr Received: via spool by 44130-done@debbugs.gnu.org id=D44130.160373148123666 (code D ref 44130); Mon, 26 Oct 2020 16:58:02 +0000 Received: (at 44130-done) by debbugs.gnu.org; 26 Oct 2020 16:58:01 +0000 Received: from localhost ([127.0.0.1]:41115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX5om-00069a-Vh for submit@debbugs.gnu.org; Mon, 26 Oct 2020 12:58:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX5om-00069Q-4M for 44130-done@debbugs.gnu.org; Mon, 26 Oct 2020 12:58:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58554) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX5og-0005Rp-H5; Mon, 26 Oct 2020 12:57:54 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33992 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kX5oe-0004gG-FF; Mon, 26 Oct 2020 12:57:52 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <6ff632f5c1e378647cecc7177b7018fb8a0ee6d4.camel@divoplade.fr> <87y2jxnl0z.fsf@gnu.org> <85064b7663c320e8062b2db78151d22fc6fcddef.camel@divoplade.fr> <871rholwzj.fsf@gnu.org> <3dca955c97222648074515b1a2c5ace96a2f1fd6.camel@divoplade.fr> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Brumaire an 229 de la =?UTF-8?Q?R=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: Mon, 26 Oct 2020 17:57:50 +0100 In-Reply-To: <3dca955c97222648074515b1a2c5ace96a2f1fd6.camel@divoplade.fr> (divoplade's message of "Fri, 23 Oct 2020 19:12:17 +0200") Message-ID: <87r1pkaprl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Spam-Score: -1.51 X-TUID: T9Ktq0jjU4lt --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! divoplade skribis: > Le vendredi 23 octobre 2020 =C3=A0 18:37 +0200, Ludovic Court=C3=A8s a = =C3=A9crit : >>=20 >> What I was questioning is the temptation to make one-function >> packages >> as is common for instance in npm. > > Ah, so I can summarize. My solutions are: > > 1. Guile provides mkdir-p: Perfect! Yes, we can work towards that goal. > 2. I put the function in a package: not great, but acceptable. > 3. I depend on gash: not acceptable, there's only mkdir-p that's > interesting, the rest is for advanced system tools. > 4. I copy that function around: not acceptable. I agree that #4 is suboptimal, but I think you=E2=80=99re overstating it. > So, there's no temptation to make one-function packages. Well=E2=80=A6 :-) > Should I understand that you question the integration of one-function > packages into guix? If you don't want it in guix, then it's fine, I can > just use it only for myself, I have my own channel. In which case, > please just say so, so we can all move on to more interesting things. No no, like I wrote, I=E2=80=99m fine adding the =E2=80=98mkdir-p=E2=80=99 = package, no problem; the project currently has no guideline against one-function packages. Anyway, I=E2=80=99ve applied the patch with the cosmetic changes below. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index e3f547412b..d09e8d9737 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -4016,12 +4016,14 @@ errors.") (method git-fetch) (uri (git-reference (url "https://code.divoplade.fr/mkdir-p.git") - (commit "83e955ba612369336a69fe50fe023ad14fbe5d7c"))) - (sha256 (base32 "01k20rjcv6p0spmw8ls776aar6bfw0jxw46d2n12w0cb2p79xjv8")) + (commit (string-append "v" version)))) + (sha256 + (base32 "01k20rjcv6p0spmw8ls776aar6bfw0jxw46d2n12w0cb2p79xjv8")) + (file-name (git-file-name name version)) (snippet `(begin (with-output-to-file ".tarball-version" - (lambda _ (format #t "~a~%" "1.0.1"))) + (lambda _ (format #t "~a~%" ,version))) #t)))) (build-system gnu-build-system) (arguments `()) @@ -4034,14 +4036,12 @@ errors.") ("pkg-config" ,pkg-config) ("gettext" ,gnu-gettext))) (inputs `(("guile" ,guile-3.0))) - (propagated-inputs - `(("guile" ,guile-3.0))) - (synopsis "Implementation of a recursive mkdir for guile") + (synopsis "Implementation of a recursive @code{mkdir} for Guile") (description - "This package provides within the (mkdir-p) module the mkdir-p function -that tries to create the chain of directories recursively. It also provides -new versions of open-output-file, call-with-output-file and -with-output-to-file to create the directory of its argument if it does not -exist.") + "This package provides within the @code{(mkdir-p)} module the +@code{mkdir-p} function that tries to create the chain of directories +recursively. It also provides new versions of @code{open-output-file}, +@code{call-with-output-file} and @code{with-output-to-file} to create the +directory of its argument if it does not exist.") (home-page "https://mkdir-p.divoplade.fr") (license license:asl2.0))) --=-=-=--