GNU bug report logs -
#73993
[PATCH] gnu: git-sizer: Pin git version.
Previous Next
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
Am Donnerstag, dem 05.12.2024 um 21:04 +0000 schrieb Greg Hogan:
> * 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
> ---
General note: when someone comments on your patch, don't forget to CC
them in upcoming revisions :)
> 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))
I'd rather avoid binding git per gexp here.
> (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"))))))
You can use (search-input-file …) instead.
> (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
I don't see a good reason to move git first to propagated-inputs and
then to inputs. I would squash this and 1/3 into one patch that
doesn't necessarily rely on G-Expressions in the middle :)
Cheers
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.