Bug 1459661 - require cargo-vendor version 0.1.14. r=kats

MozReview-Commit-ID: FRSzL74N8vY

--HG--
extra : rebase_source : 39fa35ce687793db28c0bc47466bdd4af491aeaf
This commit is contained in:
Myk Melez 2018-05-14 21:28:39 -07:00
Родитель 73800e02dd
Коммит 1c99762628
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -41,7 +41,8 @@ class VendorRust(MozbuildObject):
'''
Ensure that cargo-vendor is new enough. cargo-vendor 0.1.13 and newer
strips out .cargo-ok, .orig and .rej files, and deals with [patch]
replacements in Cargo.toml files which we want.
replacements in Cargo.toml files which we want. Version 0.1.14 and up
handles local modifications to vendored crates (bug 1323557).
'''
for l in subprocess.check_output([cargo, 'install', '--list']).splitlines():
# The line looks like one of the following:
@ -51,7 +52,7 @@ class VendorRust(MozbuildObject):
m = re.match('cargo-vendor v((\d+\.)*\d+)', l)
if m:
version = m.group(1)
return LooseVersion(version) >= b'0.1.13'
return LooseVersion(version) >= b'0.1.14'
return False
def check_modified_files(self):
@ -118,7 +119,7 @@ Please commit or stash these changes before vendoring, or re-run with `--ignore-
self.run_process(args=[cargo, 'install', 'cargo-vendor'],
append_env=env)
elif not self.check_cargo_vendor_version(cargo):
self.log(logging.INFO, 'cargo_vendor', {}, 'cargo-vendor >= 0.1.12 required; force-reinstalling (this may take a few minutes)...')
self.log(logging.INFO, 'cargo_vendor', {}, 'cargo-vendor >= 0.1.14 required; force-reinstalling (this may take a few minutes)...')
env = self.check_openssl()
self.run_process(args=[cargo, 'install', '--force', 'cargo-vendor'],
append_env=env)