[meta-xilinx] [PATCH] xsct-tarball: use fetcher cache

Manjukumar Harthikote Matha MANJUKUM at xilinx.com
Thu Mar 7 09:48:50 PST 2019



> -----Original Message-----
> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
> bounces at yoctoproject.org] On Behalf Of Jean-Francois Dagenais
> Sent: Thursday, March 07, 2019 8:39 AM
> To: meta-xilinx at yoctoproject.org
> Subject: [meta-xilinx] [PATCH] xsct-tarball: use fetcher cache
> 
> Without it, whenever a build starts on a fresh tmp directory, the file is actually
> downloaded from http://petalinux.xilinx.com each time. Even though it might be in
> the local download dir or in the SOURCE_MIRROR_URL specified mirror. This
> unnecessarily slows down build bootstrap and puts burden on xilinx.com servers.
> 

Thanks JFD for the patch

> Signed-off-by: Jean-Francois Dagenais <jeff.dagenais at gmail.com>
> ---
>  classes/xsct-tarball.bbclass | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/classes/xsct-tarball.bbclass b/classes/xsct-tarball.bbclass index
> c5a1b74..bc321a9 100644
> --- a/classes/xsct-tarball.bbclass
> +++ b/classes/xsct-tarball.bbclass
> @@ -1,7 +1,7 @@
>  XSCT_LOADER ?= "${XSCT_STAGING_DIR}/SDK/${XILINX_VER_MAIN}/bin/xsct"
> 
> -XSCT_URL ?= "http://petalinux.xilinx.com/sswreleases/rel-v2018.3/xsct-trim/"
> -XSCT_TARBALL ?= "xsct.tar.xz"
> +XSCT_URL ?= "http://petalinux.xilinx.com/sswreleases/rel-v2018.3/xsct-
> trim/xsct.tar.xz"
> +XSCT_TARBALL ?= "xsct_${XILINX_VER_MAIN}.tar.xz"
>  XSCT_DLDIR ?= "${DL_DIR}/xsct/"
>  XSCT_STAGING_DIR ?= "${STAGING_DIR}-xsct"
> 
> @@ -70,9 +70,10 @@ python xsct_event_extract() {
>              localdata = bb.data.createCopy(d)
>              localdata.setVar('FILESPATH', "")
>              localdata.setVar('DL_DIR', xsctdldir)
> -            srcuri = d.expand("${XSCT_URL}${XSCT_TARBALL};md5sum=%s" %
> chksum_tar)
> +            srcuri = d.expand("${XSCT_URL};md5sum=%s;downloadfilename=%s"
> +	                      % (chksum_tar, tarballname))
>              bb.note("Fetching xsct binary tarball from %s" % srcuri)
> -            fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
> +            fetcher = bb.fetch2.Fetch([srcuri], localdata)
>              fetcher.download()
>              localpath = fetcher.localpath(srcuri)
>              if localpath != tarballpath and os.path.exists(localpath) and not
> os.path.exists(tarballpath):
> --
> 2.11.0
> 
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx


More information about the meta-xilinx mailing list