Merge commit 'b666aa4a1e7b4bfb1a6a416fd90620edf4ed6b56' into 14542.0.0
BUG=b/222349736
TEST=local BE run
RELEASE_NOTE=None
Signed-off-by: Rayan Dasoriya <dasoriya@google.com>
Change-Id: I77dcfe3e2a6a2df407d4be4e019350aab2783ef5
diff --git a/acct-group/ntp/ntp-0.0.1.ebuild b/acct-group/ntp/ntp-0.0.1.ebuild
new file mode 100644
index 0000000..800b4ac
--- /dev/null
+++ b/acct-group/ntp/ntp-0.0.1.ebuild
@@ -0,0 +1,15 @@
+# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+SLOT="0"
+KEYWORDS="*"
+
+inherit user
+
+# TODO(crbug.com/1026816): this ebuild is just a placeholder (to satisfy Gentoo
+# dependencies) while we wait to implement acct-{group,user} properly.
+pkg_setup() {
+ enewgroup ntp
+}
diff --git a/acct-user/ntp/ntp-0.0.1.ebuild b/acct-user/ntp/ntp-0.0.1.ebuild
new file mode 100644
index 0000000..4a7f98d
--- /dev/null
+++ b/acct-user/ntp/ntp-0.0.1.ebuild
@@ -0,0 +1,15 @@
+# Copyright 2020 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+SLOT="0"
+KEYWORDS="*"
+
+inherit user
+
+# TODO(crbug/1026816): this is a placeholder (to satisfy Gentoo
+# openssh dependencies) while acct-{group,user} are implemented.
+pkg_setup() {
+ enewuser ntp
+}
diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass
index b938345..e230983 100644
--- a/eclass/git-2.eclass
+++ b/eclass/git-2.eclass
@@ -329,12 +329,17 @@
EGIT_REPO_URI_SELECTED=""
for repo_uri in ${EGIT_REPO_URI}; do
debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\""
- if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then
- # global variable containing the repo_name we will be using
- debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
- EGIT_REPO_URI_SELECTED="${repo_uri}"
- break
- fi
+ local retry=3
+ while [[ $retry != 0 ]]; do
+ if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then
+ # global variable containing the repo_name we will be using
+ debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
+ EGIT_REPO_URI_SELECTED="${repo_uri}"
+ break
+ fi
+ retry=$(($retry-1))
+ done
+ [[ -n ${EGIT_REPO_URI_SELECTED} ]] && break
done
[[ ${EGIT_REPO_URI_SELECTED} ]] \
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 3fb1ccf..299e69c 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -743,7 +743,19 @@
set -- "${fetch_command[@]}"
echo "${@}" >&2
- "${@}" || continue
+
+ local retry=3
+ local repo_fetched=false
+
+ while [[ $retry != 0 ]]; do
+ if "${@}"; then
+ repo_fetched=true
+ break
+ fi
+ retry=$(($retry-1))
+ done
+
+ [[ ${repo_fetched} ]] || continue
if [[ ${clone_type} == mirror || ${fetch_l} == HEAD ]]; then
# update our HEAD to match our remote HEAD ref