Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] oeqa/targetbuild: Use DL_DIR for downloads if present
@ 2015-04-28 10:49 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-04-28 10:49 UTC (permalink / raw)
  To: openembedded-core

This isn't a test of wget so if the files we need are present in DL_DIR,
use them from there and save a bit of speed/bandwidth and skip the wget.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index eeb08ba..d499bb1 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -26,6 +26,11 @@ class BuildProject():
     # Download self.archive to self.localarchive
     def _download_archive(self):
 
+        dl_dir = self.d.getVar("DL_DIR", True)
+        if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)):
+            bb.utils.copyfile(os.path.join(dl_dir, self.archive), self.localarchive)
+            return
+
         exportvars = ['HTTP_PROXY', 'http_proxy',
                       'HTTPS_PROXY', 'https_proxy',
                       'FTP_PROXY', 'ftp_proxy',




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-28 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-28 10:49 [PATCH] oeqa/targetbuild: Use DL_DIR for downloads if present Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox