From ca29dc9c51288930d8615e17d34031cd9503a21f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 14 Nov 2022 07:15:58 +0000 Subject: [PATCH] eclass/git-r3: Sync with Gentoo It's from Gentoo commit 207a50da440b7c6bea060972a7684e792c2a84fc. --- .../src/third_party/portage-stable/eclass/git-r3.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass index 59d4f9a003..bdb28565e2 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass @@ -887,6 +887,11 @@ git-r3_checkout() { cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die fi + # mark this directory as "safe" so that src_install() can access it + # https://bugs.gentoo.org/879353 + git config --global --add safe.directory \ + "$(cd "${out_dir}" && echo "${PWD}")" || die + # (no need to copy HEAD, we will set it via checkout) if [[ -f ${orig_repo}/shallow ]]; then