Merge pull request #1312 from brave/issues/2925-0.61.x
Make Cargo download check more reliable 0.61.x
This commit is contained in:
@@ -15,7 +15,8 @@ import deps
|
||||
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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user