From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Pascal Bach <pascal.bach@siemens.com>,
Christopher Larson <clarson@kergoth.com>
Cc: "bitbake-devel@lists.openembedded.org"
<bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] fetch2/git: always use premirror first if update is required
Date: Thu, 22 Sep 2016 13:16:27 +0100 [thread overview]
Message-ID: <1474546587.7207.361.camel@linuxfoundation.org> (raw)
In-Reply-To: <1474539467.7207.357.camel@linuxfoundation.org>
On Thu, 2016-09-22 at 11:17 +0100, Richard Purdie wrote:
> On Thu, 2016-09-22 at 09:45 +0200, Pascal Bach wrote:
> >
> > >
> > >
> > > >
> > > >
> > > > The tarball should only be fetched if the local ud.clonedir
> > > > is out of date, this means the revision that is requested via
> > > > SRCREV is not in the local repository.
> > > > In the case the revision is present the tarball should not
> > > > be
> > > > fetched again, at least that was the intention and my local
> > > > tests
> > > > didn't indicate otherwise.
> > > >
> > > >
> > > > Yes, but it’s better to run ‘git fetch’ in an out of date clone
> > > > than to re-download a 1gb mirror tarball which may well be out
> > > > of
> > > > date too.
> > > Agreed, but this doesn't work in the case where the machine
> > > doesn't
> > > have access to the upstream git repository. For example in the
> > > case
> > > where BB_ALLOWED_NETWORKS = "*.my.company". The fetcher would
> > > still
> > > got to to github.com which is not allowed, in that case it should
> > > fall back to fetch the tarball from "mirror.my.company".
> > >
> > > I'm open for suggestions how to make this more efficient.
> > Does anyone have a suggestion how this should behave in the ideal
> > case? In my opinion if there is an internal mirror defined it
> > should
> > always have precedence even if it might be less efficient.
> "less efficient" in this case translates a few seconds of git fetch
> operation on something like linux-yocto into a hundreds of megabytes
> download.
>
> Much as you might not like it, I really don't think we can change the
> code as your patch does as it would badly affect standard usage for
> many users.
>
> We need to find an alternative which allows your use case to work but
> I'm not sure what that is. Much as I hate it, we may just have to
> have
> a setting which you can set which changes the behaviour. If we do
> that,
> I will want to see test cases added for it though as the fetcher code
> is a mass of different configurations and its very very difficult to
> maintain as it is without yet more different code paths :(.
FWIW there is an open bug which I believe is related to this:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9061
It might be worth making the code aware of git aware premirror sources
compared to other things like mirror tarballs as a start at fixing
this.
Cheers,
Richard
prev parent reply other threads:[~2016-09-22 12:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 8:58 [PATCH] fetch2/git: always use premirror first if update is required Pascal Bach
2016-09-16 16:20 ` Christopher Larson
2016-09-19 7:22 ` Pascal Bach
2016-09-19 15:10 ` Christopher Larson
2016-09-20 6:51 ` Pascal Bach
2016-09-22 7:45 ` Pascal Bach
2016-09-22 10:17 ` Richard Purdie
2016-09-22 12:16 ` Richard Purdie [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=1474546587.7207.361.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=clarson@kergoth.com \
--cc=pascal.bach@siemens.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.