scripts/osmo-deps.sh: use osmo_git_clone_url

Instead of hardcoding https://git.osmocom.org for all clones, use
the osmo_git_clone_url function. This clones via https from gerrit where
possible, it should fix the many errors we are currently seeing from
the master-openbsc job:

  + osmo-deps.sh libosmo-sccp
  + project=libosmo-sccp
  + branch=master
  + git branch -a
  + grep -c remotes/origin/master$
  + [ x1 != x0 ]
  + branch=origin/master
  + test -d libosmo-sccp
  + git clone https://git.osmocom.org/libosmo-sccp libosmo-sccp
  Cloning into 'libosmo-sccp'...
  error: HTTP/2 stream 0 was closed cleanly, but before getting  all response header fields, treated as error (curl_result = 92, http_code = 0, sha1 = d23e38020fdbb685570145acd3a35e22a5a91344)
  error: HTTP/2 stream 0 was closed cleanly, but before getting  all response header fields, treated as error (curl_result = 92, http_code = 0, sha1 = 68b450098714e3015a65b6628a7e61ac09dd4d47)
  error: Unable to find 68b450098714e3015a65b6628a7e61ac09dd4d47 under https://git.osmocom.org/libosmo-sccp
  Cannot obtain needed tree 68b450098714e3015a65b6628a7e61ac09dd4d47
  while processing commit d23e38020fdbb685570145acd3a35e22a5a91344.
  error: fetch failed.

Related: https://lists.osmocom.org/hyperkitty/list/openbsc@lists.osmocom.org/thread/RHMXTPTKU2SPGCVXF55RFJQ5GYBZ46CO/
Change-Id: I700d608ff74eca3981ed41f04ee9ced9629436aa
changes/91/29191/1
Oliver Smith 6 months ago
parent 945ec9a0b3
commit 9d9a8661d6
  1. 6
      scripts/osmo-deps.sh

@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/common.sh"
set -ex
project="$1"
branch="${2:-master}"
@ -8,9 +9,8 @@ if [ "x$(git branch -a | grep -c "remotes/origin/$branch\$")" != "x0" ]; then
fi
if ! test -d "$project";
then
git clone "https://git.osmocom.org/$project" "$project"
if ! test -d "$project"; then
git clone "$(osmo_git_clone_url "$project")" "$project"
fi
cd "$project"

Loading…
Cancel
Save