From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QKcAGJDJKmVgKAAAauVa8A:P1 (envelope-from ) for ; Sat, 14 Oct 2023 19:02:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QKcAGJDJKmVgKAAAauVa8A (envelope-from ) for ; Sat, 14 Oct 2023 19:02:08 +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 E555F3B4F7 for ; Sat, 14 Oct 2023 19:02:07 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=cErNDrtk; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697302928; 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=3EDotjpd1hyvaaO5KFlBLMQjcW+dYmxvqMSOMmZZc1w=; b=UFoZ2QyR/KMcU6fLdqLZxRh675E5ptY0ohNdC/XlyVTDz3uibh1kFPFVOgci0HPqPNrBhY YaCj/NDvoDgQGnaEWeX1NuCyG6kkJ4Qj9QV7GropYvaLg9lu8zEzRSpfBK3E8d4lkJns04 fUIl5tnxJ9mmKJDuDbPjrzsI5Fp0vxC507okxbrJZQaS3bKZm6TAQB2sbLyq6spIRNnYd1 kSLZbxtN5vSBsmVNLikCzJNTR0BrHW+k56+ZKo2N3oeWaSiexj1G2kuRtDGPIvFp+Bbq0+ +ab02J6vcG4JqhJW/1so7UWGLzC2pe2MK0/TZW+bQ8Wi3Na5sX/q/B1rseyUug== 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=cErNDrtk; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697302928; a=rsa-sha256; cv=none; b=J5mBa4h8RnTROVGYR1vardqln/qm8b+J6ZuLHABHPlsihelPw+XDUR1Nl6bfQ5U4LuIgkN IGgw14xu206uttxIOi69Vy/9sb+ZONny4ojXlztPc810yl/9RUghs2dzsiBG3UyDAsloaI WqYNvsy9GZxDZSbjSX53j+ZqNM6eylm6hSmCZSwKBnJjzDJu3VNAbIcnMm/KrfIUkWXpDC 11col2LuzL/pbP7nvxbSlXy8yNV6qAR7wUf50yIBmnywEkrk+FiPqlNCCLbgIYzuKTZ8Vq 7r5kU59r54hiQByOf+XJgyDjCFxU9h88vMsLy/6KtOEzAVdnaLzCBGJF+uxpWA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qri1F-0004Mw-A2; Sat, 14 Oct 2023 13:01:41 -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 1qri1C-0004M4-Ct for bug-guix@gnu.org; Sat, 14 Oct 2023 13:01:39 -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 1qri1C-0003rL-3n for bug-guix@gnu.org; Sat, 14 Oct 2023 13:01:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qri1Z-0002Oc-LN for bug-guix@gnu.org; Sat, 14 Oct 2023 13:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65924: [PATCH core-updates 3/3] gnu: git-minimal: Add coreutils and sed to PATH. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 14 Oct 2023 17:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65924 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 65924@debbugs.gnu.org, Simon Tournier Received: via spool by 65924-submit@debbugs.gnu.org id=B65924.16973028979177 (code B ref 65924); Sat, 14 Oct 2023 17:02:01 +0000 Received: (at 65924) by debbugs.gnu.org; 14 Oct 2023 17:01:37 +0000 Received: from localhost ([127.0.0.1]:50310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qri1A-0002Nw-JW for submit@debbugs.gnu.org; Sat, 14 Oct 2023 13:01:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qri18-0002Nh-2g for 65924@debbugs.gnu.org; Sat, 14 Oct 2023 13:01:35 -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 1qri0e-0003i2-VC; Sat, 14 Oct 2023 13:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=3EDotjpd1hyvaaO5KFlBLMQjcW+dYmxvqMSOMmZZc1w=; b=cErNDrtkXd9InJPzn1+i z4ltzcQV1+m7AlvR7ZpBJ+jkGlxuLp7YqO4yWanTPMPp8qZbtGe1EUwiAkRJp9ey0wmF2dLmXcKXb XjxAEaRA0z9X6tDFmSggmFsQHu6lj/SvOr9vAY31msZKhA0zrjNjc7IHS2DTAPcePwK89aKODG0jA RZnmH+BVwij6ZCmhPZ4VBAy/VpENFGX+l0ucfnFa4H6YINYEJAW9MWMYtEZ9qA+rZziCC4gD9rV9w L8mbFfhyR431VkDs3791sKxfI4G5amyfRotTEtUY7VQpJ60OTNiTDee3y0vFsrqLTjEiuw+f6sptB hD36fEIoVU5Uyw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <9e15a3ab5f8d4f44b834e1fc90464312c60fac9e.1696734901.git.maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Sat, 7 Oct 2023 23:18:51 -0400") References: <9e15a3ab5f8d4f44b834e1fc90464312c60fac9e.1696734901.git.maxim.cournoyer@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 =?UTF-8?Q?Vend=C3=A9miaire?= an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Navet 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: Sat, 14 Oct 2023 19:01:02 +0200 Message-ID: <87r0lxdtpt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.85 X-Spam-Score: -6.85 X-Migadu-Queue-Id: E555F3B4F7 X-Migadu-Scanner: mx2.migadu.com X-TUID: fljrmFBNR2B+ Maxim Cournoyer skribis: > Fixes . > > * gnu/packages/version-control.scm (git-minimal) > [arguments] : New field. > : Augment with (ice-9 match), (ice-9 textual-ports) and (guix > search-paths). > : Add patch-commands phase. > [inputs]: Add coreutils-minimal and sed. [...] > + #:imported-modules `(,@%gnu-build-system-modules > + ,@(source-module-closure '((guix search-paths= )))) I think we should avoid the dependency on (guix search-paths) here, to avoid situation such as that described in . > + (add-after 'unpack 'patch-commands > + (lambda* (#:key inputs #:allow-other-keys) > + (define (prepend-string-to-file text file) > + "Prepend TEXT to FILE." Nitpick: no need to add a docstring to internal defines because it=E2=80=99s optimized out and inaccessible (you can use a comment instead). > + (let ((content (call-with-input-file file > + (cut get-string-all <>)))) > + (call-with-output-file file > + (lambda (port) > + (display text port) > + (display content port))))) > + > + (define PATH-variable-definition > + (let ((value > + (match (evaluate-search-paths > + (list $PATH) > + (list #$(this-package-input "coreutils-mi= nimal") > + #$(this-package-input "sed"))) > + (((spec . value)) > + value)))) > + (string-append > + (search-path-definition $PATH value > + #:kind 'prefix) "\n\n"))) > + > + ;; Ensure that coreutils (for basename) and sed are on PATH > + ;; for any script that sources the 'git-sh-setup.sh' file. > + (prepend-string-to-file PATH-variable-definition > + "git-sh-setup.sh") How about something along these lines instead: ;; Instead PATH definition at the top of the file. (substitute* "git-sh-setup.sh" (("^unset CDPATH" all) (string-append "PATH=3D" (dirname (search-input-file inputs "bin/basen= ame")) ":$PATH\nexport PATH\n" all))) ? Thanks, Ludo=E2=80=99.