mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
This reverts commit 55f06f3e06.
Reason for revert: https://b.corp.google.com/issues/458283880#comment6. Once and a while we discover a tool which uses the vendored depot tools. In this case, we weren't passing the user's depot tools path for debugging. When that happens, the workspace will break, with no visible files in the change. Instead, we'll reintroduce this, and add have the cipd root live in the out directory. That will prevent the issue from the second bullet point.
Original change's description:
> cipd: ignore .cipd_client_root
>
> It was introduced to override the cipd bin path so that the downloaded
> files wouldn't be listed in the CiderG workspace file tree when
> the bundled depot_tools is used.
>
> However,
> - chromium no longer uses the bundled depot_tools
> - the cipd_client_root, pointing to a folder in /tmp, causes issues
> when a temp cleanup cron removes files based on the last access ts.
>
> We no longer need .cipd_client_root.
>
> Bug: 415080055
> Change-Id: Ic966699cce3173a8ce4033752edec5e53aded870
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6614519
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Scott Lee <ddoman@chromium.org>
Bug: 415080055
Change-Id: If3610a3660386f50a1567c2b7bae8437eb4860f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7138561
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Terrence Reilly <treilly@google.com>
33 lines
922 B
Bash
33 lines
922 B
Bash
# Copyright 2017 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.
|
|
|
|
function cipd_bin_setup {
|
|
local MYPATH="${DEPOT_TOOLS_DIR:-$(dirname "${BASH_SOURCE[0]}")}"
|
|
local ENSURE="$MYPATH/cipd_manifest.txt"
|
|
local ROOT="$MYPATH/.cipd_bin"
|
|
|
|
UNAME="${DEPOT_TOOLS_UNAME_S:-$(uname -s | tr '[:upper:]' '[:lower:]')}"
|
|
case $UNAME in
|
|
cygwin*)
|
|
ENSURE="$(cygpath -w $ENSURE)"
|
|
ROOT="$(cygpath -w $ROOT)"
|
|
;;
|
|
esac
|
|
|
|
# value in .cipd_client_root file overrides the default root.
|
|
CIPD_ROOT_OVERRIDE_FILE="${MYPATH}/.cipd_client_root"
|
|
if [ -f "${CIPD_ROOT_OVERRIDE_FILE}" ]; then
|
|
ROOT=$(<"${CIPD_ROOT_OVERRIDE_FILE}")
|
|
fi
|
|
|
|
(
|
|
source "$MYPATH/cipd" ensure \
|
|
-log-level warning \
|
|
-ensure-file "$ENSURE" \
|
|
-root "$ROOT"
|
|
)
|
|
|
|
echo $ROOT
|
|
}
|