[bitbake-devel] [PATCH 1/1] fetch2/local.py: avoid using PREMIRROR

Richard Purdie richard.purdie at linuxfoundation.org
Mon Jan 11 13:23:16 UTC 2016


On Mon, 2016-01-04 at 02:15 -0800, Robert Yang wrote:
> The PREMIRROR isn't useful for "file://", so avoid using it, this is
> good for searching speed and can reduce useless lines in
> log.do_fetch.
> 
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
>  bitbake/lib/bb/fetch2/local.py |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/bitbake/lib/bb/fetch2/local.py
> b/bitbake/lib/bb/fetch2/local.py
> index 2d921f7..7245651 100644
> --- a/bitbake/lib/bb/fetch2/local.py
> +++ b/bitbake/lib/bb/fetch2/local.py
> @@ -126,3 +126,8 @@ class Local(FetchMethod):
>      def clean(self, urldata, d):
>          return
>  
> +    def try_premirror(self, urldata, d):
> +        """
> +        Should premirrors be used?
> +        """
> +        return False

Hi Robert,

I applied this but I think I'm going to have to revert this since it is
in fact a valid use case.

The sstate.bbclass code sets up SSTATE_MIRRORS as PREMIRRORS. Its quite
common to map those file:// urls to remote http:// urls and with the
above change, this no longer works.

Cheers,

Richard





More information about the bitbake-devel mailing list