1 |
Mark all checkout directories as "safe" to avoid dubious ownership |
2 |
errors with newer git versions when the checkout directory is accessed |
3 |
from src_install(). |
4 |
|
5 |
Bug: https://bugs.gentoo.org/879353 |
6 |
Signed-off-by: Michał Górny <mgorny@g.o> |
7 |
--- |
8 |
eclass/git-r3.eclass | 5 +++++ |
9 |
1 file changed, 5 insertions(+) |
10 |
|
11 |
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass |
12 |
index 59d4f9a0038f..bdb28565e2f9 100644 |
13 |
--- a/eclass/git-r3.eclass |
14 |
+++ b/eclass/git-r3.eclass |
15 |
@@ -887,6 +887,11 @@ git-r3_checkout() { |
16 |
cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die |
17 |
fi |
18 |
|
19 |
+ # mark this directory as "safe" so that src_install() can access it |
20 |
+ # https://bugs.gentoo.org/879353 |
21 |
+ git config --global --add safe.directory \ |
22 |
+ "$(cd "${out_dir}" && echo "${PWD}")" || die |
23 |
+ |
24 |
# (no need to copy HEAD, we will set it via checkout) |
25 |
|
26 |
if [[ -f ${orig_repo}/shallow ]]; then |
27 |
-- |
28 |
2.38.1 |