mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
This reverts commit 8b5b594115.
Reason for revert: nothing wrong with this CL, but implementing a manual roll to build.git takes more than 20 min. I will reland this CL once my roll to build.git CL is ready
Original change's description:
> add "generic" infra path config
>
> It proved to be dangerous to introduce conditional logic into recipes
> and recipe modules to alternate between buildbot and luci modes, namely
> it touches buildbot code paths, which can be very dangerous.
>
> Instead, introduce "generic" default path config that configures
> existing base paths from the built-in ones.
>
> Also remove swarmbucket path config because it is not used.
>
> R=iannucci@chromium.org
> BUG=660481
>
> Change-Id: Ide0e1f64913fe35766b997ab5b55f01f4c63aa58
> Reviewed-on: https://chromium-review.googlesource.com/459234
> Commit-Queue: Nodir Turakulov <nodir@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
>
TBR=iannucci@chromium.org,nodir@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=660481
Change-Id: If27a537689dfe3669015bcbc7a5f07ca1f5c10af
Reviewed-on: https://chromium-review.googlesource.com/461223
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
30 lines
1001 B
Python
30 lines
1001 B
Python
# Copyright 2016 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
from recipe_engine import recipe_api
|
|
|
|
|
|
class InfraPathsApi(recipe_api.RecipeApi):
|
|
"""infra_paths module is glue for design mistakes. It will be removed."""
|
|
|
|
def initialize(self):
|
|
path_config = self.m.properties.get('path_config')
|
|
if path_config:
|
|
# TODO(phajdan.jr): remove dupes from the engine and delete infra_ prefix.
|
|
self.m.path.set_config('infra_' + path_config)
|
|
|
|
@property
|
|
def default_git_cache_dir(self):
|
|
"""Returns the location of the default git cache directory.
|
|
|
|
This property should be used instead of using path['git_cache'] directly.
|
|
|
|
It returns git_cache path if it is defined (Buildbot world), otherwise
|
|
uses the more generic [CACHE]/git path (LUCI world).
|
|
"""
|
|
try:
|
|
return self.m.path['git_cache']
|
|
except KeyError:
|
|
return self.m.path['cache'].join('git')
|