[bitbake-devel] [PATCH] fetch2/git: always use premirror first if update is required
Christopher Larson
clarson at kergoth.com
Fri Sep 16 16:20:01 UTC 2016
On Fri, Sep 16, 2016 at 1:58 AM, Pascal Bach <pascal.bach at siemens.com>
wrote:
> When an update of the local copy is required always try to fetch the update
> from a premirror first.
> The premirror should always have precedence over the upstream repository
> as updating from there might not work if BB_FETCH_PREMIRRORONLY,
> BB_NO_NBB_ALLOWED_NETWORKS or BB_NO_NETWORK is set.
>
> This also gets rid of the special case for BB_FETCH_PREMIRRORONLY.
>
> Signed-off-by: Pascal Bach <pascal.bach at siemens.com>
> ---
> lib/bb/fetch2/git.py | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
> index 1bec60a..cac2a87 100644
> --- a/lib/bb/fetch2/git.py
> +++ b/lib/bb/fetch2/git.py
> @@ -227,13 +227,8 @@ class Git(FetchMethod):
> return False
>
> def try_premirror(self, ud, d):
> - # If we don't do this, updating an existing checkout with only
> premirrors
> - # is not possible
> - if d.getVar("BB_FETCH_PREMIRRORONLY", True) is not None:
> - return True
> - if os.path.exists(ud.clonedir):
> - return False
> - return True
> + # Always try premirror if an update is required
> + return self.need_update(ud, d)
>
Will this result in fetching a mirror tarball even if you already have a
clone in ud.clonedir? The previous logic always returned False if the
clonedir existed..
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20160916/293ea8cb/attachment-0002.html>
More information about the bitbake-devel
mailing list