[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-bundle/master] Bug 20735: Inline fetch --dry-run to pass a revision to gclient sync



commit 3cf7b5af18a4fa0ad0813c0e16148dc1e578c04a
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Sat Jan 7 09:35:07 2017 -0800

    Bug 20735: Inline fetch --dry-run to pass a revision to gclient sync
    
     * Recent upstream changes require manual intervention when doing the
       initial fetch, which we'd like to avoid.  For now, just sync as far
       as we need.
---
 gitian/fetch-inputs.sh | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh
index 729e492..8c543d8 100755
--- a/gitian/fetch-inputs.sh
+++ b/gitian/fetch-inputs.sh
@@ -319,17 +319,38 @@ PATH="$PATH:$PWD/depot_tools"
 # Use --no-history because the whole checkout with history is about 12 GB.
 export GYP_CROSSCOMPILE=1
 export GYP_DEFINES="use_x11=0"
+# JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
+# default-java comes from the package default-jdk-headless.
+export JAVA_HOME=/usr/lib/jvm/default-java
 mkdir -p "$dir"
 cd "$dir"
 if [ ! -d "src" ];
 then
   # "fetch" is part of depot_tools.
-  fetch --nohooks --no-history webrtc
+  #fetch --nohooks --no-history webrtc
+  # FIXME: To avoid the unconditional `gclient sync` in the call to fetch,
+  # we inline the result of a `fetch --dry-run`
+  gclient root
+  gclient config --spec 'solutions = [
+  {
+    "managed": False,
+    "name": "src",
+    "url": "https://chromium.googlesource.com/external/webrtc.git";,
+    "custom_deps": {},
+    "deps_file": "DEPS",
+    "safesync_url": "",
+  },
+]
+'
+  gclient sync --nohooks --no-history --with_branch_heads -r $WEBRTC_TAG
+  cd src
+  git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
+  git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
+  git config diff.ignoreSubmodules all
+  cd ..
 fi
 # "gclient" is part of depot_tools. This download takes a long time the first time.
-# JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
-# default-java comes from the package default-jdk-headless.
-JAVA_HOME=/usr/lib/jvm/default-java gclient sync --with_branch_heads --no-history -r $WEBRTC_TAG
+gclient sync --no-history --with_branch_heads -r $WEBRTC_TAG
 cd ..
 tar --exclude .git -czf webrtc.tar.gz webrtc
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits