summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/git-r3.eclass')
-rw-r--r--eclass/git-r3.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 59d4f9a0038f..bdb28565e2f9 100644
--- a/eclass/git-r3.eclass
+++ b/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