From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] support/scripts/setlocalversion: fix detection of hg revision when _not_ on branch 'default'
Date: Mon, 4 Feb 2019 21:24:42 +0100 [thread overview]
Message-ID: <20190204212442.67e8b435@windsurf> (raw)
In-Reply-To: <20190130201508.10304-1-patrickdepinguin@gmail.com>
On Wed, 30 Jan 2019 21:15:07 +0100
Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> When Buildroot is stored in a Mercurial repository on a branch other than
> 'default' ('master' in git terms), setlocalversion (used to populate
> /etc/os-release) will incorrectly think that this is a tagged version and
> will NOT print out the revision hash.
>
> This is due to the fact that the output of 'hg id' is assumed to be
> "<revision> <tags-if-any>"
> but when on a branch it actually is:
> "<revision> (<branch>) <tags-if-any>"
>
> To let setlocalversion receive the output it expects, explicitly ask 'hg id'
> to retrieve only the revision hash and any tags, ommitting any branch
> information.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> ---
> support/scripts/setlocalversion | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Both applied to master. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-02-04 20:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 20:15 [Buildroot] [PATCH 1/2] support/scripts/setlocalversion: fix detection of hg revision when _not_ on branch 'default' Thomas De Schampheleire
2019-01-30 20:15 ` [Buildroot] [PATCH 2/2] support/scripts/setlocalversion: ignore user settings for Mercurial Thomas De Schampheleire
2019-02-18 16:13 ` Peter Korsgaard
2019-02-04 20:24 ` Thomas Petazzoni [this message]
2019-02-18 16:13 ` [Buildroot] [PATCH 1/2] support/scripts/setlocalversion: fix detection of hg revision when _not_ on branch 'default' Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190204212442.67e8b435@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.