1 |
commit: ee0b97b10ce02d42e608e477d97629c6591e3489 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 15 15:41:25 2019 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 15 18:15:29 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee0b97b1 |
7 |
|
8 |
acct-user.eclass: die explicitly if HOME is missing in preinst |
9 |
|
10 |
Closes: https://bugs.gentoo.org/691478 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
eclass/acct-user.eclass | 8 ++++++++ |
14 |
1 file changed, 8 insertions(+) |
15 |
|
16 |
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass |
17 |
index 60009643c14..008dc6bb7d6 100644 |
18 |
--- a/eclass/acct-user.eclass |
19 |
+++ b/eclass/acct-user.eclass |
20 |
@@ -334,6 +334,14 @@ acct-user_pkg_preinst() { |
21 |
if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then |
22 |
ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]} |
23 |
fi |
24 |
+ # Path might be missing due to INSTALL_MASK, etc. |
25 |
+ # https://bugs.gentoo.org/691478 |
26 |
+ if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then |
27 |
+ eerror "Home directory is missing from the installation image:" |
28 |
+ eerror " ${ACCT_USER_HOME}" |
29 |
+ eerror "Check INSTALL_MASK for entries that would cause this." |
30 |
+ die "${ACCT_USER_HOME} does not exist" |
31 |
+ fi |
32 |
fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}" |
33 |
fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}" |
34 |
fi |