Commit Graph

14 Commits (main)

Author SHA1 Message Date
Mike Frysinger 792831e176 ensure_bootstrap: basic argument processing
Running with --help shouldn't actually do the bootstrap.

Change-Id: Id481432cdfc23121e5b71cbe64ffb2068fea8e23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6165754
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
2 months ago
Yiwei Zhang b4e97035af redirect stdout and stderr of cipd_bin_setup to /dev/null
Otherwise, the cipd_bin_setup would print the root of cipd directory
everytime.

Bug: 357131092
Change-Id: I376a1eb9e06db6fce8e7a21ab08a4af40dde3ccd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5762367
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
7 months ago
Mike Frysinger 248aa8ba81 setup & share path to depot_tools checkout
A lot of scripts like to compute the dirname of $0 to find itself to
load more files.  Have some scripts export & resuse this value so we
avoid recalculating when not needed.

Bug: 1469696
Change-Id: I3aac2e6119dbfa3c68715208df2786f67cdce92e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4750430
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Mike Frysinger 04e04ae337 ensure_bootstrap: always resolve base_dir with dirname
Other depot_tools scripts use dirname regardless of mingw,
so do that here too to simplify.

Bug: 1469696
Change-Id: Ia3c22a4eb72e62564eee1e8b18a88671c8b8b9a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4748852
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
2 years ago
Mike Frysinger e8b6776755 ensure_bootstrap/update_depot_tools: drop cwd symlink resolution
This was added long ago to workaround svn behavior with symlinked dirs.
We haven't used svn in years, so drop this logic to simplify.

Bug: 1469696
Change-Id: Ic881ec74b1a3caa002a131be48259a56be30d4f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4745419
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
2 years ago
Josip Sokcevic ba94bbeaa8 Use python3 for gsutil bootstrapping
R=gavinmak@google.com

Change-Id: I6aaac69c9712e4d639e8804ab603bc18190d88be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3570169
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Mike Frysinger 45a7f406ab ensure_bootstrap: bootstrap tools in parallel
Running each bootstrap in serial seriously slows things down, and it
gets worse as we add more.  On my very expensive desktop, the no-op
case takes 5 seconds.  When running in parallel, it's now ~1.5 sec.

Change-Id: I4304fddf22ef5a718218a807aeb05e08e5418bb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3245746
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
3 years ago
Edward Lemur 24995256ee Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
Don't call ensure_bootstrap from update_depot_tools.
ensure_bootstrap also updates gsutil and all versions of pylint
which is slow, particularly on MinGW.

Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
>
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
>
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

Bug: 1002153
Change-Id: Ia7579e440438897ba4a7c65a8b228dcfe7f28c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1810040
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur f73f0f401a Revert "Reland "depot_tools: Bootstrap Python 3 on Linux/Mac""
This reverts commits 0e85f633c7 and 9d25ad4192.

Reason for revert:

Causes problems for MinGW users.

Original change's description:
> Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
>
> This is a reland of dbca865e55
>
> Original change's description:
> > depot_tools: Bootstrap Python 3 on Linux/Mac
> >
> > This will make it possible for developers to execute depot_tools
> > scripts using Python 3 in a known environment.
> >
> > Bug: 1002153
> > Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> > Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
>
> Bug: 1002153
> Change-Id: I6938a76ffa05366c21f7c56aed3d07ecb2b84443
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1798845
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,dpranke@chromium.org,tandrii@google.com,ehmaldonado@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1002153
Change-Id: I3ee87b95b2532ec694d7f4f87cce8cde8ccf86eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1808137
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur 0e85f633c7 Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
This is a reland of dbca865e55

Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
> 
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
> 
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

Bug: 1002153
Change-Id: I6938a76ffa05366c21f7c56aed3d07ecb2b84443
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1798845
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lesmes cc6f585f05 Revert "depot_tools: Bootstrap Python 3 on Linux/Mac"
This reverts commit dbca865e55.

Reason for revert:

Fails on Mac

$ gclient sync --with_branch_heads
awk: syntax error at source line 1
 context is
	match($0, >>>  /cpython3\/.*version:([.0-9a-zA-Z]+)/, <<<
awk: bailing out at source line 1
Could not extract Python 3 version from manifest.


Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
> 
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
> 
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

TBR=iannucci@chromium.org,dpranke@chromium.org,tandrii@google.com,ehmaldonado@chromium.org

Change-Id: I8e03a9e22655491d0f8e8d214d04ba749c2ab8ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1002153
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1797197
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur dbca865e55 depot_tools: Bootstrap Python 3 on Linux/Mac
This will make it possible for developers to execute depot_tools
scripts using Python 3 in a known environment.

Bug: 1002153
Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
6 years ago
Mike Frysinger 53297790de pylint: rework wrapper to use vpython for multiple versions
This allows people to pin a specific version of pylint when running
it.  The default behavior is unchanged: we run pylint-1.5.6 still
as we've created a vpython wheel in cipd for it.  But for projects
that want to move to a newer version, they can pick any of the new
1.x wrappers.  Having the full set of versions here allows projects
to incrementally move to newer versions as the lint delta between
1.5 & 1.6 tends to be much smaller than 1.5 & 1.9.

We don't include support for the newer 2.x series as those only
support Python 3 which the codebase isn't ready for.

Bug: 866772
Test: `./pylint ...` still works & shows pylint-1.5
Test: `./pylint-1.5 ...` runs the v1.5 version
Test: `./pylint-1.8 ...` runs the v1.8 version
Change-Id: I7c47187493564db81e3eb28c6dbd09e6309ead46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1752507
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
6 years ago
Dan Jacques 35c5b9ad1b [depot_tools] Add "ensure_bootstrap" script.
Add a "ensure_bootstrap" script, which syncs the bootstrapped state of
"depot_tools" so that remaining operations become read-only.

BUG=chromium:769369
TEST=local

Change-Id: I2dab36112b378a926d8201d2ab31a7daa9f5da29
Reviewed-on: https://chromium-review.googlesource.com/691318
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago