kumquat-buildroot/support
Thomas De Schampheleire 44084aa981 support/scripts/setlocalversion: ignore user settings for Mercurial
setlocalversion will use 'hg id' to determine whether or not the current
revision is tagged. If there is no tag, the Mercurial revision is printed,
otherwise nothing is printed.

The problem is that the user may have custom configuration settings (in
their ~/.hgrc file or similar) that changes the output of 'hg id' in a way
that the script does not expect. In such cases, the Mercurial revision may
not be printed or printed incorrectly.

It is good practice to ignore the user environment when calling Mercurial
commands from a well-defined script, by setting the environment variable
HGRCPATH to the empty string. See also 'hg help environment'.

In the particular case of Nokia, a custom extension adds dynamic tags in the
repository, i.e. tags that are stored in a file external to the repository
and only visible when the extension is active. These tags should not
influence the behavior of setlocalversion as they are not official Buildroot
tags, i.e. even if a revision is tagged, the Mercurial revision should still
be printed.

Note that this still does not solve the problem where an organization adds
_real_ tags in their Buildroot repository. For example, there might be a
moving tag 'last-validated' or tags indicating in which product release that
Buildroot revision was used. In these cases, setlocalversion will still not
behave as expected, i.e. show the Mercurial revision.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-04 21:25:33 +01:00
..
config-fragments support/config-fragments: add RISC-V 32-bit to autobuild configs 2019-01-10 21:30:21 +01:00
dependencies infra: add force build flag for host dependencies 2019-02-04 15:52:44 +01:00
docker support/docker: use the distro-provided flake8 2018-06-17 20:54:02 +02:00
download support/download: fix scp downloads 2019-01-03 22:05:43 +01:00
gnuconfig support/gnuconfig: bump version to 2016-05-15 2016-06-05 22:26:57 +02:00
kconfig support/kconfig/merge_config.sh: avoid false positive matches from comment lines 2018-11-24 10:11:15 +01:00
legal-info legal-info: add hash for our own license file 2017-07-05 16:31:40 +02:00
libtool
misc infra/pkg-cmake: use an obviously-invalid value for CMAKE_SYSTEM_VERSION 2019-01-16 23:19:09 +01:00
scripts support/scripts/setlocalversion: ignore user settings for Mercurial 2019-02-04 21:25:33 +01:00
testing testing/tests/download: test case for git refs 2019-02-04 20:44:29 +01:00