Subject: Re: bug#63092: [PATCH] gnu: git: Update to 2.40.1 [security fixes].
From: Ludovic Courtès <[email-masked]>
To: Greg Hogan <[email-masked]>
Cc: [email-masked]
Date: Thu, 11 May 2023 15:15:40 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Greg,

Greg Hogan <[email-masked]> skribis:

> * gnu/packages/version-control.scm (git-minimal)
> [arguments]<#:phases>(remove-unusable-perl-commands): Add file check
> before deleting perl scripts so that this phase works for both new and
> old, pinned versions.

[...]

> +                             (if (file-exists? file)
> +                               (delete-file (string-append libexec
> +                                                           "/git-core/" file))))
> +                           ;; git-add--interactive was removed in Git 2.40 but
> +                           ;; this phase is inherited by older versions.

The ‘file-exists?’ and ‘delete-file’ calls are passed different file
names.  Also, this won’t prevent a rebuild of ‘git-minimal/pinned’.

So I went with a different approach to achieve that goal.  Applied now.

Thanks!

Ludo’.