All of lore.kernel.org
 help / color / mirror / Atom feed
From: akuster808 <akuster808@gmail.com>
To: Niko Mauno <niko.mauno@iki.fi>,
	openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][warrior][PATCH 1/2] gitpkgv.bbclass: Use --git-dir option
Date: Sun, 24 Nov 2019 08:46:14 -0800	[thread overview]
Message-ID: <2c4e2cac-ff7b-d598-b0a8-f2d8de2d1201@gmail.com> (raw)
In-Reply-To: <20191123134631.81271-1-niko.mauno@iki.fi>

wrong ml

On 11/23/19 5:46 AM, Niko Mauno wrote:
> From: "niko.mauno@vaisala.com" <niko.mauno@vaisala.com>
>
> Avoid redundant shell working directory change by resorting to
> '--git-dir' option for git command instead.
>
> Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-oe/classes/gitpkgv.bbclass | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass
> index 2d9680a35..22609f584 100644
> --- a/meta-oe/classes/gitpkgv.bbclass
> +++ b/meta-oe/classes/gitpkgv.bbclass
> @@ -87,10 +87,8 @@ def get_git_pkgv(d, use_tags):
>  
>                  if not os.path.exists(rev_file) or os.path.getsize(rev_file)==0:
>                      commits = bb.fetch2.runfetchcmd(
> -                        "cd %(repodir)s && "
> -                        "git rev-list %(rev)s -- 2> /dev/null "
> -                        "| wc -l" % vars,
> -                        d, quiet=True).strip().lstrip('0')
> +                        "git --git-dir=%(repodir)s rev-list %(rev)s -- 2>/dev/null | wc -l"
> +                        % vars, d, quiet=True).strip().lstrip('0')
>  
>                      if commits != "":
>                          oe.path.remove(rev_file, recurse=False)
> @@ -105,9 +103,8 @@ def get_git_pkgv(d, use_tags):
>                  if use_tags:
>                      try:
>                          output = bb.fetch2.runfetchcmd(
> -                            "cd %(repodir)s && "
> -                            "git describe %(rev)s 2>/dev/null" % vars,
> -                            d, quiet=True).strip()
> +                            "git --git-dir=%(repodir)s describe %(rev)s 2>/dev/null"
> +                            % vars, d, quiet=True).strip()
>                          ver = gitpkgv_drop_tag_prefix(output)
>                      except Exception:
>                          ver = "0.0-%s-g%s" % (commits, vars['rev'][:7])



  parent reply	other threads:[~2019-11-24 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 13:46 [meta-oe][warrior][PATCH 1/2] gitpkgv.bbclass: Use --git-dir option Niko Mauno
2019-11-23 13:46 ` [meta-oe][warrior][PATCH 2/2] gitpkgv.bbclass: Support also lightweight tags Niko Mauno
2019-11-24 16:46 ` akuster808 [this message]
2019-11-25 13:59   ` [meta-oe][warrior][PATCH 1/2] gitpkgv.bbclass: Use --git-dir option Peter Kjellerstedt

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=2c4e2cac-ff7b-d598-b0a8-f2d8de2d1201@gmail.com \
    --to=akuster808@gmail.com \
    --cc=niko.mauno@iki.fi \
    --cc=openembedded-devel@lists.openembedded.org \
    /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.