From 229ac2bb535ca62b00a91778e07833175f0b761a Mon Sep 17 00:00:00 2001 From: Robbie Iannucci Date: Thu, 15 Dec 2016 02:49:42 +0000 Subject: [PATCH] Revert "Revert "Stop adhoc cipd client bootstrap."" This reverts commit 70f351e7843cb689bf9f3520d4d6183b138591f2. Reason for revert: CIPD bootstrap is now PS 2.0 compatible. BUG=674363,673940 Original change's description: > Revert "Stop adhoc cipd client bootstrap." > > This reverts commit c6569aab121ed8e2859438fddf03dda81831252b. > > Reason for revert: This caused crbug.com/674363, needs further investigation. > > Original change's description: > > Stop adhoc cipd client bootstrap. > > > > This was used before to get the git installer, but now depot_tools manages its > > own copy of CIPD. > > > > BUG=673940 > > > > Change-Id: I1077ff7eb27d9ca191dc0092b7cacaaa69c40449 > > Reviewed-on: https://chromium-review.googlesource.com/420303 > > Commit-Queue: Robbie Iannucci > > Reviewed-by: Aaron Gable > > Reviewed-by: Vadim Shtayura > > > > TBR=iannucci@chromium.org,agable@chromium.org,vadimsh@chromium.org,dnj@chromium.org,sebmarchand@chromium.org,chromium-reviews@chromium.org > BUG=673940 > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I7aa5561ad0df67831987cd8d53a84105d42d9663 > Reviewed-on: https://chromium-review.googlesource.com/420320 > Commit-Queue: Robbie Iannucci > Reviewed-by: Robbie Iannucci > TBR=iannucci@chromium.org,agable@chromium.org,vadimsh@chromium.org,dnj@chromium.org,chromium-reviews@chromium.org,sebmarchand@chromium.org BUG=673940 NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I822312b1507003ee07930ef7527e12b997457673 Reviewed-on: https://chromium-review.googlesource.com/420321 Commit-Queue: Robbie Iannucci Reviewed-by: Robbie Iannucci --- bootstrap/win/git_bootstrap.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/bootstrap/win/git_bootstrap.py b/bootstrap/win/git_bootstrap.py index fd48a69242..08655cafe9 100644 --- a/bootstrap/win/git_bootstrap.py +++ b/bootstrap/win/git_bootstrap.py @@ -17,6 +17,8 @@ ROOT_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) DEVNULL = open(os.devnull, 'w') +BAT_EXT = '.bat' if sys.platform.startswith('win') else '' + def _check_call(argv, **kwargs): """Wrapper for subprocess.check_call that adds logging.""" @@ -43,17 +45,6 @@ def clean_up_old_git_installations(git_directory): shutil.rmtree(full_entry, ignore_errors=True) -def bootstrap_cipd(cipd_directory, cipd_platform): - """Bootstraps CIPD client into |cipd_directory|.""" - _check_call([ - sys.executable, - os.path.join(ROOT_DIR, 'recipe_modules', 'cipd', 'resources', - 'bootstrap.py'), - '--platform', cipd_platform, - '--dest-directory', cipd_directory - ]) - - def cipd_install(args, dest_directory, package, version): """Installs CIPD |package| at |version| into |dest_directory|.""" manifest_file = tempfile.mktemp() @@ -104,9 +95,6 @@ def need_to_install_git(args, git_directory): def install_git(args, git_version, git_directory): """Installs |git_version| into |git_directory|.""" cipd_platform = 'windows-%s' % ('amd64' if args.bits == 64 else '386') - if not args.cipd_client: - bootstrap_cipd(ROOT_DIR, cipd_platform) - args.cipd_client = os.path.join(ROOT_DIR, 'cipd') temp_dir = tempfile.mkdtemp() try: cipd_install(args, @@ -172,7 +160,9 @@ def main(argv): parser = argparse.ArgumentParser() parser.add_argument('--bits', type=int, choices=(32,64), default=64, help='Bitness of the client to install.') - parser.add_argument('--cipd-client', help='Path to CIPD client binary.') + parser.add_argument('--cipd-client', + help='Path to CIPD client binary. default: %(default)s', + default=os.path.join(ROOT_DIR, 'cipd'+BAT_EXT)) parser.add_argument('--cipd-cache-directory', help='Path to CIPD cache directory.') parser.add_argument('--force', action='store_true', @@ -200,4 +190,4 @@ def main(argv): if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) \ No newline at end of file + sys.exit(main(sys.argv[1:]))