GNU bug report logs - #73993
[PATCH] gnu: git-sizer: Pin git version.

Previous Next

Package: guix-patches;

Reported by: Greg Hogan <code <at> greghogan.com>

Date: Thu, 24 Oct 2024 19:14:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Greg Hogan <code <at> greghogan.com>
To: 73993 <at> debbugs.gnu.org
Cc: Greg Hogan <code <at> greghogan.com>
Subject: [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version.
Date: Thu,  5 Dec 2024 21:04:33 +0000
* gnu/packages/version-control.scm (git-sizer)
[arguments]<#:phases>: Hard-code git path in 'fix-paths.
[propagated-inputs]: Remove git.
[inputs]: Add git-minimal/pinned.

Change-Id: Icc21f92e0261ff05f3411970e6f4792763a94f80
---
 gnu/packages/version-control.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 37ee819688..8c7d817523 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4468,10 +4468,13 @@ (define-public git-sizer
       #~(modify-phases %standard-phases
           (add-after 'unpack 'fix-paths
             (lambda _
-              (let ((git #$git))
+              (let ((git #$git-minimal/pinned))
                (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
                  (("bin/git-sizer")
-                  (string-append #$output "/bin/git-sizer"))))))
+                  (string-append #$output "/bin/git-sizer")))
+               (substitute* '("src/github.com/github/git-sizer/git/git.go")
+                 (("gitBin, err := findGitBin\\(\\)")
+                  (string-append "gitBin := \"" git "/bin/git\"\n\tvar err error"))))))
           (replace 'check
             (lambda* (#:key tests? import-path #:allow-other-keys)
               (when tests?
@@ -4481,9 +4484,9 @@ (define-public git-sizer
                           ;; Git repository.
                           '("TestBomb" "TestFromSubdir" "TestRefgroups"
                             "TestRefSelections" "TestTaggedTags"))))))))
+    (inputs (list git-minimal/pinned))
     (propagated-inputs
-     (list git
-           go-github-com-cli-safeexec
+     (list go-github-com-cli-safeexec
            go-github-com-davecgh-go-spew
            go-github-com-pmezard-go-difflib
            go-github-com-spf13-pflag
-- 
2.47.1





This bug report was last modified 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.