guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in bui


From: Simon Tournier
Subject: Re: hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts)
Date: Tue, 12 Sep 2023 09:44:17 +0200

Hi Vagrant,

On Mon, 11 Sep 2023 at 12:35, Vagrant Cascadian <vagrant@debian.org> wrote:

> What about making git an optional dependency, and only calling out to
> "git gc" if git is available in PATH?

Somehow, that’s more or less the case, IIUC,

--8<---------------cut here---------------start------------->8---
15 candidates:
./build/android-repo.scm:57:      (invoke git-repo-command "init" "-u" 
manifest-url "-b" manifest-revision
./build/android-repo.scm:59:      (invoke git-repo-command "sync" "-c" 
"--fail-fast" "-v" "-j"
./build/git.scm:55:      (invoke git-command "init" "--initial-branch=main")
./build/git.scm:56:      (invoke git-command "remote" "add" "origin" url)
./build/git.scm:58:          (invoke git-command "checkout" "FETCH_HEAD")
./build/git.scm:62:            (invoke git-command "fetch" "origin")
./build/git.scm:63:            (invoke git-command "checkout" commit)))
./build/git.scm:66:        (invoke git-command "submodule" "update" "--init" 
"--recursive")
./git-download.scm:175:                         (invoke "git" "-C" #$output 
"init")
./git-download.scm:176:                         (invoke "git" "-C" #$output 
"config" "--local"
./git-download.scm:178:                         (invoke "git" "-C" #$output 
"config" "--local"
./git-download.scm:180:                         (invoke "git" "-C" #$output 
"add" ".")
./git-download.scm:181:                         (invoke "git" "-C" #$output 
"commit" "-am" "init")
./git-download.scm:182:                         (invoke "git" "-C" #$output 
"read-tree" "--empty")
./git-download.scm:183:                         (invoke "git" "-C" #$output 
"reset" "--hard")
--8<---------------cut here---------------end--------------->8---

An “optional dependency”, is it not already the case?

I read hard-dependency as the idea behind a change like [1].  For
instance, something like:

--8<---------------cut here---------------start------------->8---
diff --git a/guix/self.scm b/guix/self.scm
index 81a36e007f..41c5f40786 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -68,6 +68,7 @@ (define %packages
       ("gzip"               . ,(ref 'compression 'gzip))
       ("bzip2"              . ,(ref 'compression 'bzip2))
       ("xz"                 . ,(ref 'compression 'xz))
+      ("git-minimal"        . ,(ref 'version-control 'git-minimal))
       ("po4a"               . ,(ref 'gettext 'po4a))
       ("gettext-minimal"    . ,(ref 'gettext 'gettext-minimal))
       ("gcc-toolchain"      . ,(ref 'commencement 'gcc-toolchain))
@@ -825,6 +826,9 @@ (define* (compiled-guix source #:key
   (define guile-lzma
     (specification->package "guile-lzma"))

+  (define git
+    (specification->package "git-minimal"))
+
--8<---------------cut here---------------end--------------->8---

In the context of the proposal patch#65866 [1], this hard-dependency
makes sense.  From my point of view, once we have git-minimal as a
hard-dependency, I do not see the point to keep slower Git operations
using libgit2; as ’commit-relation’ for one example.

But maybe I am missing something.

Cheers,
simon


1: [bug#65866] [PATCH 5/8] build: Add dependency on Git.
Ludovic Courtès <ludo@gnu.org>
Mon, 11 Sep 2023 16:25:23 +0200
id:4eca94501c2c1e9986e1f718eeccb3eb9276dcd4.1694441831.git.ludo@gnu.org
https://issues.guix.gnu.org//65866
https://issues.guix.gnu.org/msgid/4eca94501c2c1e9986e1f718eeccb3eb9276dcd4.1694441831.git.ludo@gnu.org
https://yhetil.org/guix/4eca94501c2c1e9986e1f718eeccb3eb9276dcd4.1694441831.git.ludo@gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]