bug-guix
[Top][All Lists]
Advanced

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

bug#36371: guix build --with-git-reference=…


From: Ludovic Courtès
Subject: bug#36371: guix build --with-git-reference=…
Date: Tue, 25 Jun 2019 14:38:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi!

Tobias Geerinckx-Rice <address@hidden> skribis:

> bricewge on #guix informed me that there's no way to pass a git tag as
> source transformation option.  Indeed:
>
>  ‘--with-commit=PACKAGE=COMMIT’
>     This is similar to ‘--with-branch’, except that it builds   from
>     COMMIT rather than the tip of a branch.  COMMIT must be a   valid
> Git
>     commit SHA1 identifier.

Indeed:

--8<---------------cut here---------------start------------->8---
$ guix build guile-gcrypt --with-commit=guile-gcrypt=v1.0.0
updating checkout of 'https://notabug.org/cwebber/guile-gcrypt.git'...
guix build: error: cannot fetch commit v1.0.0 from 
https://notabug.org/cwebber/guile-gcrypt.git: unable to parse OID - contains 
invalid characters
--8<---------------cut here---------------end--------------->8---

Internally, that uses the ‘git-checkout’ record type defined in (guix
git).

What I would propose is to change ‘git-checkout-compiler’ so that it can
determine with a simple heuristic like that of (@@ (guix swh) commit-id?)
whether the string denotes a commit ID or a tag.

WDYT?

> - Why is the (extremely) git-specific ‘--with-commit=’ option not
> called ‘--with-git-commit=’?  Was it intended to be more generic than
> it is now?  Should the new option be ‘--with-reference=’ as well?
> That's pushing it a little far.  And three questions in one; I'm
> cheating.

Things are named this way for simplicity; the only exception is
‘--with-git-url’ because ‘--with-url’ would have been too vague.

Ludo’.





reply via email to

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