From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [autobuild 4/4] autobuild-run: allow to change default git uri and branch through env. vars.
Date: Sun, 12 Apr 2015 19:26:40 +0200 [thread overview]
Message-ID: <20150412192640.5b6089b3@free-electrons.com> (raw)
In-Reply-To: <1428849285-21092-4-git-send-email-s.martin49@gmail.com>
Dear Samuel Martin,
On Sun, 12 Apr 2015 16:34:45 +0200, Samuel Martin wrote:
> This is useful when hacking the autobuild-run script on some specific
> Buildroot tree.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
> scripts/autobuild-run | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/autobuild-run b/scripts/autobuild-run
> index dbfc33e..e1c6c5d 100755
> --- a/scripts/autobuild-run
> +++ b/scripts/autobuild-run
> @@ -102,6 +102,16 @@ Format of the configuration file:
> Default values for the arguments are:
>
> %s
> +
> +Environment variables:
> +
> + BUILDROOT_GIT_REPO_URI
> + This environment variable allows to fetch the given Buildroot git repository
> + instead of the official one.
> +
> + BUILDROOT_GIT_BRANCH
> + This environment variable allows to change the Buildroot git branch instead
> + of master.
> """ % '\n '.join(
> ['%s = %s' % (key, val) for (key, val) in defaults.items()])
>
> @@ -297,8 +307,10 @@ def prepare_build(**kwargs):
> # Clone Buildroot. This only happens if the source directory
> # didn't exist already.
> srcdir = os.path.join(idir, "buildroot")
> + br_repo = os.environ.get("BUILDROOT_GIT_REPO_URI", "git://git.busybox.net/buildroot")
> + br_branch = os.environ.get("BUILDROOT_GIT_BRANCH", "master")
> if not os.path.exists(srcdir):
> - ret = subprocess.call(["git", "clone", "git://git.busybox.net/buildroot", srcdir],
> + ret = subprocess.call(["git", "clone", "-b", br_branch, br_repo, srcdir],
> stdout=log, stderr=log)
> if ret != 0:
> log_write(log, "ERROR: could not clone Buildroot sources")
Why environment variables? http://patchwork.ozlabs.org/patch/394526/
was proposing to use options, which was much better IMO. If you could
take this approach (after refreshing the patch), I would be OK.
Note that in the patch from Matt Weber, I also explicitly asked that
when a non-default repo/branch is used, the script should refuse to
submit the results to autobuild.b.o.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-04-12 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-12 14:34 [Buildroot] [autobuild 1/4] autobuild-run: prevent send_result from failing when gathering config files Samuel Martin
2015-04-12 14:34 ` [Buildroot] [autobuild 2/4] autobuild-run: also save CMake config log files on package failure Samuel Martin
2015-04-12 14:34 ` [Buildroot] [autobuild 3/4] autobuild-run: sanitize make options Samuel Martin
2015-04-12 17:22 ` Thomas Petazzoni
2015-04-12 18:20 ` Samuel Martin
2015-04-12 14:34 ` [Buildroot] [autobuild 4/4] autobuild-run: allow to change default git uri and branch through env. vars Samuel Martin
2015-04-12 17:26 ` Thomas Petazzoni [this message]
2015-04-12 18:06 ` Samuel Martin
2015-04-13 12:34 ` Matthew Weber
2015-04-12 17:20 ` [Buildroot] [autobuild 1/4] autobuild-run: prevent send_result from failing when gathering config files Thomas Petazzoni
2015-04-12 18:15 ` Samuel Martin
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=20150412192640.5b6089b3@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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.