From: Ben Boeckel <mathstuf@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] mpdstate: add package
Date: Sun, 19 Jun 2016 16:43:57 +0000 (UTC) [thread overview]
Message-ID: <nk6i4d$8hm$1@ger.gmane.org> (raw)
In-Reply-To: 20160617104131.0f27432f@free-electrons.com
On Fri, 17 Jun, 2016 at 08:41:31 GMT, Thomas Petazzoni wrote:
> On Fri, 17 Jun 2016 10:36:00 +0200, Kurt Van Dijck wrote:
>> I'm yet puzzled by the version info that I take from the git repository,
>> that does not work in buildroot since it's buildroot's git repo there.
>> I haven't found a solution yet, and that's keeping me from updating my
>> patches :-)
>
> Your package build system should not call "git describe" or call git to
> get the version. Or at least it should provide a way to override that.
The way to do this properly is to add to .gitattributes:
<filespec> export-subst
and in <filespec>, any strings in the form of $Format:$ will be
expanded, the right side being a format string (see git-log(1)). I
usually do logic like:
if ("$Format:$" == "") {
// git archive tarball
commit_short = "$Format:%h"
commit = "$Format:%H"
} else if (isdir(".git"))
// Run "git describe"
} else {
commit_short = "<unknown>"
commit = "<unknown>"
}
--Ben
prev parent reply other threads:[~2016-06-19 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 6:36 [Buildroot] [PATCH] mpdstate: add package Kurt Van Dijck
2016-06-12 19:53 ` Thomas Petazzoni
2016-06-17 8:36 ` Kurt Van Dijck
2016-06-17 8:41 ` Thomas Petazzoni
2016-06-19 16:43 ` Ben Boeckel [this message]
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='nk6i4d$8hm$1@ger.gmane.org' \
--to=mathstuf@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox