All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/4] br-reproduce-build: fix URL of gitid
Date: Sat, 14 Feb 2015 22:10:14 +0100	[thread overview]
Message-ID: <20150214221014.4643c5cd@free-electrons.com> (raw)
In-Reply-To: <ca854982ed957dec6bdc523ae2974e0aa630ea75.1423910953.git.yann.morin.1998@free.fr>

Dear Yann E. MORIN,

On Sat, 14 Feb 2015 11:52:05 +0100, Yann E. MORIN wrote:
> Reported-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
>  utils/br-reproduce-build | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/br-reproduce-build b/utils/br-reproduce-build
> index c0dc530..9987684 100755
> --- a/utils/br-reproduce-build
> +++ b/utils/br-reproduce-build
> @@ -16,9 +16,11 @@ if [ $# -ne 1 ] ; then
>      exit 1 ;
>  fi
>  
> -BUILD_ID=$1
> +# BUILD_ID must be in the form xxx/xxxyyyyyyyyyy (xxxyyyyy... being the sha1)
> +BUILD_ID="${1#*/}"
> +BUILD_ID="${BUILD_ID%${BUILD_ID#???}}/${BUILD_ID}"
>  
> -BUILD_DIR=${OUTPUT_DIR}/${BUILD_ID}
> +BUILD_DIR="${OUTPUT_DIR}/${BUILD_ID#*/}"

This shell stuff is so complicated that I don't even understand what is
the behavior. When you say "BUILD_ID must be in the form
xxx/xxxyyyyyyyyyy", does it mean that the user is supposed to pass as
argument to the script a value in the form "xxx/xxxyyyyyyyyyyy" ? If
so, then it's clearly not the intended behavior: the full hash should
be sufficient.

Maybe a few more comments would be useful to understand the magic.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-02-14 21:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14 10:52 [Buildroot] [pull request] buildroot-test: misc enhancenments for br-reproduce-build Yann E. MORIN
2015-02-14 10:52 ` [Buildroot] [PATCH 1/4] br-reproduce-build: accept BASE_GIT and OUTPUT_DIR from the env Yann E. MORIN
2015-02-14 21:08   ` Thomas Petazzoni
2015-02-15  0:30     ` Yann E. MORIN
2015-02-14 10:52 ` [Buildroot] [PATCH 2/4] br-reproduce-build: use current directory as the default for outputs Yann E. MORIN
2015-02-14 21:08   ` Thomas Petazzoni
2015-02-14 10:52 ` [Buildroot] [PATCH 3/4] br-reproduce-build: fix URL of gitid Yann E. MORIN
2015-02-14 21:10   ` Thomas Petazzoni [this message]
2015-02-14 21:58     ` Yann E. MORIN
2015-02-18 20:12       ` Fabio Porcedda
2015-02-18 20:26         ` Yann E. MORIN
2015-02-18 20:37           ` Fabio Porcedda
2015-02-14 10:52 ` [Buildroot] [PATCH 4/4] br-reproduce-build: quote all variables Yann E. MORIN
2015-02-14 21:10   ` Thomas Petazzoni
2015-02-14 22:00     ` Yann E. MORIN

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=20150214221014.4643c5cd@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.