summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2012-06-22 15:14:10 +0000
committerIan Stakenvicius <axs@gentoo.org>2012-06-22 15:14:10 +0000
commit9e5bd337e68e4e5ba566ec50d23fd7eba94ea3c5 (patch)
tree1c8b9c185e70b0c85d8504e23b71fdc90cf0cd0a /eclass
parentMarking unrar-4.2.3 ppc64 for bug 421221 (diff)
downloadhistorical-9e5bd337e68e4e5ba566ec50d23fd7eba94ea3c5.tar.gz
historical-9e5bd337e68e4e5ba566ec50d23fd7eba94ea3c5.tar.bz2
historical-9e5bd337e68e4e5ba566ec50d23fd7eba94ea3c5.zip
fixed esethome, directory must exist befure user record can be updated
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/user.eclass16
2 files changed, 13 insertions, 8 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 657eed38ea41..d4242416449f 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.324 2012/06/22 12:41:51 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.325 2012/06/22 15:14:10 axs Exp $
+
+ 22 Jun 2012; Ian Stakenvicius <axs@gentoo.org> user.eclass:
+ fixed esethome, directory must exist befure user record can be updated
22 Jun 2012; Bernard Cafarelli <voyageur@gentoo.org> gnustep-base.eclass:
Stable gnustep-base does not have USE=libobjc2, thanks ago
diff --git a/eclass/user.eclass b/eclass/user.eclass
index d2b76c8e8221..5261c2ddd47e 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.19 2012/06/18 16:51:34 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.20 2012/06/22 15:14:10 axs Exp $
# @ECLASS: user.eclass
# @MAINTAINER:
@@ -424,6 +424,14 @@ esethome() {
fi
einfo " - Home: ${ehome}"
+ # ensure home directory exists, otherwise update will fail
+ if [[ ! -e ${ROOT}/${ehome} ]] ; then
+ einfo " - Creating ${ehome} in ${ROOT}"
+ mkdir -p "${ROOT}/${ehome}"
+ chown "${euser}" "${ROOT}/${ehome}"
+ chmod 755 "${ROOT}/${ehome}"
+ fi
+
# update the home directory
case ${CHOST} in
*-darwin*)
@@ -439,12 +447,6 @@ esethome() {
;;
esac
- if [[ ! -e ${ROOT}/${ehome} ]] ; then
- einfo " - Creating ${ehome} in ${ROOT}"
- mkdir -p "${ROOT}/${ehome}"
- chown "${euser}" "${ROOT}/${ehome}"
- chmod 755 "${ROOT}/${ehome}"
- fi
}
fi