[Top][All Lists]

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

The sources with a git ref origin should also include the .git directory

From: divoplade
Subject: The sources with a git ref origin should also include the .git directory
Date: Sat, 01 Aug 2020 14:50:52 +0200
User-agent: Evolution 3.30.5-1.1

Hello guix,

I am in the process of writing some code, and I like the fact that the
source of a guix package can have a git reference. However, when I use
it, the .git directory is not present when building the source.

Did I missed something? This is very inconvenient, because I use "git
describe" to compute the version number, and there is nothing I can do
without the .git. 

I could update the version number on each commit, but then it will not
work when merging branches, and the tag system is generally better, so
I have no version information in the sources checked in the git

Please note that this could benefit all the packages that use the git-
veersion-gen script. For the meson build system, the .git directory is
also mandatory, I think.

My solution for now is to write the version to a file named ".tarball-
version" at the root of the package, create an artificial commit, and
use that as the source. However, it is not reproducible because re-
creating the same commit (with the same date and authorship
information) will lead to another commit ID.

Can I do something better? Is it possible to include the ".git"
directory with a git source?


reply via email to

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