Fix API breakage caused by OS Plugin version scan
[releng/global-jjb.git] / shell / gerrit-fetch-dependencies.sh
index 99a71f0..1cb5177 100644 (file)
@@ -30,7 +30,7 @@ set +u  # Allow unbound variables for virtualenv
 virtualenv --quiet "/tmp/v/git-review"
 # shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
 source "/tmp/v/git-review/bin/activate"
-pip install --quiet --upgrade pip
+pip install --quiet --upgrade "pip==9.0.3" setuptools
 pip install --quiet --upgrade git-review
 set -u
 # End git-review workaround
@@ -41,6 +41,11 @@ for patch in $(echo "${PATCHES[@]}"); do
     project=$(echo "$json" | jq -r '.project')
     branch=$(echo "$json" | jq -r '.branch')
 
+    if [ "$GERRIT_CHANGE_NUMBER" == "$patch" ]; then
+        echo "WARN: GERRIT_CHANGE and $patch are one and the same. Ignoring patch..."
+        continue
+    fi
+
     if [ ! -d "$REPOS_DIR/$project" ]; then
         git clone -q --depth 1 -b "$branch" "$GIT_URL/$project" "$REPOS_DIR/$project"