build: gen-version-i.sh: use a fixed abbrev length
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 26 May 2023 16:17:01 +0000 (12:17 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 31 Aug 2023 14:38:42 +0000 (10:38 -0400)
commit4862d1ac1aeb71125394d6110a505b71fd8349e0
treeb3dfd06f7caf6b5d8c8b18e2cf590c0101de3a47
parent3ccee65c5e2c22dae34f2a25a14601bbf795fbff
build: gen-version-i.sh: use a fixed abbrev length

When doing:

 - make
 - sudo make install

... it is possible for the `sudo make install` command to generate a new
src/common/version.i file, if the regular user has a custom value for
the `core.abbrev` git configuration variable.

The version.i file generated by `make` contains a version number with a
hash of a certain length.  Then `sudo make install` generates an
equivalent version number, but with a hash of a different length.  This
then causes some object files that depended on it to be rebuilt, which
is not expected for the install target.

To avoid this, add --abbrev=12 to the git describe command that
genenerates the version string, so that the same hash representation is
generated during both "make" and "sudo make install".

Change-Id: I979d6a9d627f133909dc026e0d2820b52f409d98
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Fixes: https://bugs.lttng.org/issues/1376
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10098
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/gen-version-i.sh
This page took 0.047436 seconds and 4 git commands to generate.