Message ID | 20230426190346.3457310-3-code@greghogan.com |
---|---|
State | New |
Headers | show |
Series | Update git [security fixes]. | expand |
Hi Greg, Greg Hogan <code@greghogan.com> 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’.
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 5f6766f510..0467e9f4cb 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -634,8 +634,11 @@ (define-public git-minimal (bin (string-append out "/bin")) (libexec (string-append out "/libexec"))) (for-each (lambda (file) - (delete-file (string-append libexec - "/git-core/" file))) + (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. '("git-svn" "git-cvsimport" "git-archimport" "git-cvsserver" "git-request-pull" "git-add--interactive" "git-cvsexportcommit"