From 6501a89aab2220dda29ce4d458c69b95a446f29a Mon Sep 17 00:00:00 2001 From: Terry Mancey Date: Fri, 11 Jan 2019 22:12:26 +0000 Subject: [PATCH] Make Cargo download check more reliable Fix https://github.com/brave/brave-browser/issues/2925 --- script/download_rust_deps.py | 7 ++++--- script/rust_deps_config.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/script/download_rust_deps.py b/script/download_rust_deps.py index 63b0a6a5117c..6102b09d44a1 100755 --- a/script/download_rust_deps.py +++ b/script/download_rust_deps.py @@ -15,7 +15,8 @@ from rust_deps_config import RUST_DEPS_PACKAGES_URL, RUST_DEPS_PACKAGE_VERSION SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) -RUSTUP_DIR = os.path.join(SOURCE_ROOT, 'build', 'rustup', RUST_DEPS_PACKAGE_VERSION) +RUSTUP_DIR = os.path.join(SOURCE_ROOT, 'build', 'rustup') +RUST_DEPS_DIR = os.path.join(RUSTUP_DIR, RUST_DEPS_PACKAGE_VERSION) def GetUrl(platform): @@ -34,7 +35,7 @@ def GetUrl(platform): def AlreadyUpToDate(): - if not os.path.exists(RUSTUP_DIR): + if not os.path.exists(RUST_DEPS_DIR): return False return True @@ -49,7 +50,7 @@ def DownloadAndUnpackRustDeps(platform): try: deps.DownloadAndUnpack(url, RUSTUP_DIR) except urllib2.URLError: - print 'Failed to download Rust deps %s' % rust_deps_url + print 'Failed to download Rust deps %s' % url print 'Exiting.' sys.exit(1) diff --git a/script/rust_deps_config.py b/script/rust_deps_config.py index a2994a075866..f71ed3908e66 100755 --- a/script/rust_deps_config.py +++ b/script/rust_deps_config.py @@ -5,4 +5,4 @@ # Version number and URL for pre-configured rust dependency package, e.g. rust_deps_mac_0.1.0.gz RUST_DEPS_PACKAGES_URL = "https://s3-us-west-2.amazonaws.com/rust-pkg-brave-core" -RUST_DEPS_PACKAGE_VERSION = "0.1.0" +RUST_DEPS_PACKAGE_VERSION = "0.1.1"