From: Martin Jansa <martin.jansa@gmail.com>
To: Zhenhua Luo <zhenhua.luo@freescale.com>
Cc: b43082@freescale.com, b40290@freescale.com,
bitbake-devel@lists.openembedded.org, b40527@freescale.com
Subject: Re: [PATCH] bitbake: fetch2/git: add nobranch option for SRC_URI to skip validating SHA
Date: Tue, 7 Jan 2014 09:34:40 +0100 [thread overview]
Message-ID: <20140107083440.GM3709@jama> (raw)
In-Reply-To: <1389064866-26141-1-git-send-email-zhenhua.luo@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
On Tue, Jan 07, 2014 at 11:21:06AM +0800, Zhenhua Luo wrote:
> For rebased git tree, some commits can be found in tag rather than branch, the change
> is useful for such case.
>
> Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
> ---
> lib/bb/fetch2/git.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
> index b4b9368..6d74dbb 100644
> --- a/lib/bb/fetch2/git.py
> +++ b/lib/bb/fetch2/git.py
> @@ -101,6 +101,8 @@ class Git(FetchMethod):
>
> ud.rebaseable = ud.parm.get("rebaseable","0") == "1"
>
> + ud.nobranch = ud.parm.get("nobranch","0") == "1"
> +
> # bareclone implies nocheckout
> ud.bareclone = ud.parm.get("bareclone","0") == "1"
> if ud.bareclone:
> @@ -217,7 +219,7 @@ class Git(FetchMethod):
> ud.repochanged = True
> os.chdir(ud.clonedir)
> for name in ud.names:
> - if not self._contains_ref(ud, d, name):
> + if not ud.nobranch and not self._contains_ref(ud, d, name):
I think that even with nobranch param set you need to check that SHA-1
is included, you just don't care in which branch if it's even included
in any.
Something like
def _contains_ref(self, tag, branch, d):
was doing before 89abfbc1953e3711d6c90aff793ee622c22609b1, so the
conditional should be in _contains_ref not skipping it completely.
> raise bb.fetch2.FetchError("Unable to find revision %s in branch %s even from upstream" % (ud.revisions[name], ud.branches[name]))
>
> def build_mirror_data(self, ud, d):
> --
> 1.8.4.2
>
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2014-01-07 8:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 3:21 [PATCH] bitbake: fetch2/git: add nobranch option for SRC_URI to skip validating SHA Zhenhua Luo
2014-01-07 8:34 ` Martin Jansa [this message]
2014-01-07 10:47 ` zhenhua.luo
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=20140107083440.GM3709@jama \
--to=martin.jansa@gmail.com \
--cc=b40290@freescale.com \
--cc=b40527@freescale.com \
--cc=b43082@freescale.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=zhenhua.luo@freescale.com \
/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.