[bitbake-devel] [PATCH] fetch2/wget: Use FETCHCMD_wget to provide the commandline and options

Richard Purdie richard.purdie at linuxfoundation.org
Mon Jul 9 19:47:00 UTC 2012


On Mon, 2012-07-09 at 17:53 +0100, Richard Purdie wrote:
> This also changes to use  -t 2 -T 30 as the defaults which are more sane for
> a modern fetcher and already specified in OpenEmbedded metadata.
> 
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
> diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
> index e223b21..9881c8c 100644
> --- a/bitbake/lib/bb/fetch2/wget.py
> +++ b/bitbake/lib/bb/fetch2/wget.py
> @@ -56,13 +56,15 @@ class Wget(FetchMethod):
>      def download(self, uri, ud, d, checkonly = False):
>          """Fetch urls"""
>  
> +        basecmd = data.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"

+        basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"

There is a typo here...

Cheers,

Richard

>          if checkonly:
> -            fetchcmd = data.getVar("CHECKCOMMAND_wget", d, True) or d.expand("/usr/bin/env wget --spider -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'")
> +            fetchcmd = data.getVar("CHECKCOMMAND_wget", d, True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
>          elif os.path.exists(ud.localpath):
>              # file exists, but we didnt complete it.. trying again..
> -            fetchcmd = data.getVar("RESUMECOMMAND_wget", d, True) or d.expand("/usr/bin/env wget -c -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'")
> +            fetchcmd = data.getVar("RESUMECOMMAND_wget", d, True) or d.expand(basecmd + " --spider -P ${DL_DIR} '${URI}'")
>          else:
> -            fetchcmd = data.getVar("FETCHCOMMAND_wget", d, True) or d.expand("/usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'")
> +            fetchcmd = data.getVar("FETCHCOMMAND_wget", d, True) or d.expand(basecmd + " -P ${DL_DIR} '${URI}'")
>  
>          uri = uri.split(";")[0]
>          uri_decoded = list(decodeurl(uri))
> 
> 
> 
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel






More information about the bitbake-devel mailing list