From: "Pavel Zhukov" <pavel@zhukoff.net>
To: Qi.Chen@windriver.com, bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH 1/2] fetch2/git.py: Fetch mirror into HEAD
Date: Wed, 31 Jan 2024 08:50:14 +0100 [thread overview]
Message-ID: <bce7631f-04c8-40f0-848d-5a4a4e2fd454@app.fastmail.com> (raw)
In-Reply-To: <0b842389-284d-0709-1dd8-ad63e2f8921f@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 2650 bytes --]
BB_FETCH_PREMIRRORONLY is not hard requirement here.
any usage of PREMIRRORS causes failure on second fetch but it's hidden by fetching from upstream iif available n most cases.
--
Pavel
On Wed, Jan 31, 2024, at 04:49, Chen Qi via lists.openembedded.org wrote:
> On 1/27/24 20:15, Pavel Zhukov wrote:
> > Fix the issue with using of (pre)mirror in case if clonedir exists but
> > outdated.
>
> If I understand it right, the error only appears when
> BB_FETCH_PREMIRRORONLY is set, right?
>
> If so, could you please update the commit message to include this
> information?
>
> Regards,
>
> Qi
>
> > Previous version of the code fetched new mirror content into FETCH_HEAD
> > instead of branch which caused refetch from the upstream. Add new remote
> > add fetch from it instead so the ref can be found by "_contains_ref"
> >
> > Fixes [Yocto #15369]
> >
> > Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
> > ---
> > bitbake/lib/bb/fetch2/git.py | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
> > index 0deeb5cee1..b4497911f1 100644
> > --- a/bitbake/lib/bb/fetch2/git.py
> > +++ b/bitbake/lib/bb/fetch2/git.py
> > @@ -375,7 +375,11 @@ class Git(FetchMethod):
> > else:
> > tmpdir = tempfile.mkdtemp(dir=d.getVar('DL_DIR'))
> > runfetchcmd("tar -xzf %s" % ud.fullmirror, d, workdir=tmpdir)
> > - fetch_cmd = "LANG=C %s fetch -f --progress %s " % (ud.basecmd, shlex.quote(tmpdir))
> > + output = runfetchcmd("%s remote" % ud.basecmd, d, quiet=True, workdir=ud.clonedir)
> > + if 'mirror' in output:
> > + runfetchcmd("%s remote rm mirror" % ud.basecmd, d, workdir=ud.clonedir)
> > + runfetchcmd("%s remote add --mirror=fetch mirror %s" % (ud.basecmd, tmpdir), d, workdir=ud.clonedir)
> > + fetch_cmd = "LANG=C %s fetch -f --update-head-ok --progress mirror " % (ud.basecmd)
> > runfetchcmd(fetch_cmd, d, workdir=ud.clonedir)
> > repourl = self._get_repo_url(ud)
> >
> >
> >
> >
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#15813): https://lists.openembedded.org/g/bitbake-devel/message/15813
> Mute This Topic: https://lists.openembedded.org/mt/103994536/6390638
> Group Owner: bitbake-devel+owner@lists.openembedded.org <mailto:bitbake-devel%2Bowner@lists.openembedded.org>
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [pavel@zhukoff.net]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 4986 bytes --]
prev parent reply other threads:[~2024-01-31 7:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-27 12:15 [PATCH 1/2] fetch2/git.py: Fetch mirror into HEAD Pavel Zhukov
2024-01-27 12:15 ` [PATCH 2/2] tests/fetch.py: add multiple fetches test Pavel Zhukov
2024-01-31 3:49 ` [bitbake-devel] [PATCH 1/2] fetch2/git.py: Fetch mirror into HEAD ChenQi
2024-01-31 7:50 ` Pavel Zhukov [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=bce7631f-04c8-40f0-848d-5a4a4e2fd454@app.fastmail.com \
--to=pavel@zhukoff.net \
--cc=Qi.Chen@windriver.com \
--cc=bitbake-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).