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