Bug 1323557 - preserve vendored crates when re-vendoring; r=ted.mielczarek

`mach vendor rust` currently removes third_party/rust before `cargo update`,
which prevents modifying vendored crates for local testing and try pushes.
It's also unnecessary.  So this patch removes the code that removes the dir.

MozReview-Commit-ID: IE0FZ3of8Py

--HG--
extra : rebase_source : 5236e2decd95f4c83b34430d5423b80e84acdf07
This commit is contained in:
Myk Melez 2018-04-20 11:53:10 -07:00
Родитель 4b0cdc70e8
Коммит 07946d0eeb
1 изменённых файлов: 1 добавлений и 3 удалений

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

@ -289,14 +289,12 @@ license file's hash.
relative_vendor_dir = 'third_party/rust'
vendor_dir = mozpath.join(self.topsrcdir, relative_vendor_dir)
self.log(logging.INFO, 'rm_vendor_dir', {}, 'rm -rf %s' % vendor_dir)
mozfile.remove(vendor_dir)
# We use check_call instead of mozprocess to ensure errors are displayed.
# We do an |update -p| here to regenerate the Cargo.lock file with minimal changes. See bug 1324462
subprocess.check_call([cargo, 'update', '-p', 'gkrust'], cwd=self.topsrcdir)
subprocess.check_call([cargo, 'vendor', '--quiet', '--no-delete', '--sync', 'Cargo.lock'] + [vendor_dir], cwd=self.topsrcdir)
subprocess.check_call([cargo, 'vendor', '--quiet', '--sync', 'Cargo.lock'] + [vendor_dir], cwd=self.topsrcdir)
if not self._check_licenses(vendor_dir):
self.log(logging.ERROR, 'license_check_failed', {},