1 |
commit: 095f4b4daf6029369c5d5ed308607c8b1e45276d |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 31 17:08:26 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 31 17:08:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=095f4b4d |
7 |
|
8 |
scripts/bootstrap-prefix: check ownership of $EPREFIX dir, bug #715312 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/715312 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
scripts/bootstrap-prefix.sh | 12 +++++++++++- |
14 |
1 file changed, 11 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
17 |
index 5eca478c5a..25e091c37a 100755 |
18 |
--- a/scripts/bootstrap-prefix.sh |
19 |
+++ b/scripts/bootstrap-prefix.sh |
20 |
@@ -2714,10 +2714,20 @@ EOF |
21 |
EPREFIX= |
22 |
continue |
23 |
fi |
24 |
+ if [[ $(stat -c '%U/%G' "${EPREFIX}"/.canihaswrite) != \ |
25 |
+ $(stat -c '%U/%G' "${EPREFIX}") ]] ; |
26 |
+ then |
27 |
+ echo |
28 |
+ echo "The $EPREFIX directory has different ownership than expected." |
29 |
+ echo "Ensure the directory is owned (user and group) by your" |
30 |
+ echo "primary ids" |
31 |
+ EPREFIX= |
32 |
+ continue |
33 |
+ fi |
34 |
# don't really expect this one to fail |
35 |
rm -f "${EPREFIX}"/.canihaswrite || exit 1 |
36 |
# location seems ok |
37 |
- break; |
38 |
+ break |
39 |
done |
40 |
export STAGE1_PATH=${PATH} |
41 |
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$EPREFIX/tmp/usr/local/bin:${PATH}" |