full gclient sync from a mirror

473 views
Skip to first unread message

Rob Walker

unread,
Mar 30, 2016, 5:59:22 PM3/30/16
to Chromium-dev
I'd like to limit the git and https traffic to upstream servers from my team syncing Chromium.  I'm mostly able to accomplish this today, by supplying a custom_var for chromium_git in my .gclient.

There are a couple of places this doesn't work, though, today:
  • pdfium: which has a literal URL, no Var('pdfium_git')
  • boringssl: same issue
  • buildtools: this has a recursive DEPS file, and gclient does not appear to support custom_vars for Var() calls in recursion=1 DEPS files

I can supply a trivial patch for the first 2, but I'm not sure about the best approach for buildtools. I'm looking for guidance on what the correct thing to do is here.  Should gclient support the .gclient file's custom_vars for recursive DEPS?  If so, it's a one-liner:

diff --git a/gclient.py b/gclient.py
index c240d47..528aadf 100755
--- a/gclient.py
+++ b/gclient.py
@@ -709,7 +709,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
     for name, url in deps.iteritems():
       should_process = self.recursion_limit and self.should_process
       deps_to_add.append(Dependency(
-          self, name, url, None, None, None, None, None,
+          self, name, url, None, None, None, self.custom_vars, None,
           self.deps_file, should_process))
     deps_to_add.sort(key=lambda x: x.name)

Thanks,
Rob

Dirk Pranke

unread,
Mar 30, 2016, 6:28:15 PM3/30/16
to rwa...@codeaurora.org, Chromium-dev, Nico Weber, Aaron Gable
I'm fairly certain that we don't recurse into src/buildtools/DEPS from src/DEPS, and so I think the
buildtools/DEPS file is either completely obsolete or maybe just used by thakis@ as a reference
when he wants to update the clang folders.

So, maybe it's not a real issue in that case?

However, it's probably reasonable to make the custom vars propagate into recursion regardless.

-- Dirk


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Primiano Tucci

unread,
Mar 31, 2016, 6:14:39 AM3/31/16
to dpr...@chromium.org, rwa...@codeaurora.org, Chromium-dev, Nico Weber, Aaron Gable
Is your plan to setup local mirrors of chromium.googlesource.com and fetch from there?
If that is the case, I think it's going to be way easier if you 
 git config url."https://whateverz".insteadOf https://chromium.googlesource.com
and mock everything at the git level.

Rob Walker

unread,
Mar 31, 2016, 12:50:31 PM3/31/16
to dpr...@chromium.org, Chromium-dev, Nico Weber, Aaron Gable
my most recent fetch of master includes the result of recursion into src/buildtools/DEPS...

[rwalker@ruffian chromium_android]$ gclient revinfo -a | grep buildtools
src/buildtools: https://chromium.googlesource.com/chromium/buildtools.git@80b5126f91be4eb359248d28696746ef09d5be67
src/buildtools/clang_format/script: https://chromium.googlesource.com/chromium/llvm-project/cfe/tools/clang-format.git@a72164df8be7d1c68ae1ad6c3541e7819200327e
src/buildtools/third_party/libc++/trunk: https://chromium.googlesource.com/chromium/llvm-project/libcxx.git@aad34a13af010898f54c1bb2069194cb083cea4b
src/buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git@9a39e428d018b723d7d187181fd08908b1cb6bd0

If recursion=1 is not supposed to appear in buildtools/DEPS, who should fix that (looks like a very old change)?  I don't know where else buildtools gets used, how to verify the correctness of such a change...

Thanks,
Rob
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Dirk Pranke

unread,
Mar 31, 2016, 12:55:14 PM3/31/16
to Rob Walker, Chromium-dev, Nico Weber, Aaron Gable
Some combination of thakis@, agable@, and I will look into it.

Some of us are looking into reworking how gclient works in a few ways, recursive handling
of DEPS being one of them, and whether or not buildtools/DEPS is actually used in
a Chromium build is an interesting data point, because I didn't think we recursed into
*any* deps ...

-- Dirk

Rob Walker

unread,
Mar 31, 2016, 1:55:29 PM3/31/16
to dpr...@chromium.org, Chromium-dev, Nico Weber, Aaron Gable
One other nit: fetch generates a .gclient with deps_file = .DEPS.git.  This appears to be ignored by gclient, or mapped to DEPS at some point?

-Rob

Dirk Pranke

unread,
Mar 31, 2016, 2:10:06 PM3/31/16
to Rob Walker, Chromium-dev, Nico Weber, Aaron Gable
Yeah, gclient maps .DEPS.git back to DEPS, if .DEPS.git doesn't exist. We should probably just fix fetch.

-- Dirk
Reply all
Reply to author
Forward
0 new messages