summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2012-06-22 19:18:24 +0000
committerIan Stakenvicius <axs@gentoo.org>2012-06-22 19:18:24 +0000
commite24010079fe308ad2be2368fcf2954a3c5938fb0 (patch)
tree5980b0503ae58b924f144aebaf7e0742ce20e68f /eclass
parentesethome: eerror and not die when home dir cannot be updated, due to for inst... (diff)
downloadgentoo-2-e24010079fe308ad2be2368fcf2954a3c5938fb0.tar.gz
gentoo-2-e24010079fe308ad2be2368fcf2954a3c5938fb0.tar.bz2
gentoo-2-e24010079fe308ad2be2368fcf2954a3c5938fb0.zip
esethome: silently exit if home dir already up to date, improve messaging
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/user.eclass9
2 files changed, 12 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index d095016f8f9a..8cb2b8061703 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.326 2012/06/22 18:57:33 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.327 2012/06/22 19:18:24 axs Exp $
+
+ 22 Jun 2012; Ian Stakenvicius <axs@gentoo.org> user.eclass:
+ esethome: silently exit if home dir already up to date, improve messaging
22 Jun 2012; Ian Stakenvicius <axs@gentoo.org> user.eclass:
esethome: eerror and not die when home dir cannot be updated, due to for
diff --git a/eclass/user.eclass b/eclass/user.eclass
index 9f9f684d66b7..fa7e747d473e 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.21 2012/06/22 18:57:33 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.22 2012/06/22 19:18:24 axs Exp $
# @ECLASS: user.eclass
# @MAINTAINER:
@@ -422,6 +422,13 @@ esethome() {
if [[ ${ehome} == "-1" ]] ; then
ehome="/dev/null"
fi
+
+ # exit with no message if home dir is up to date
+ if [[ $(egethome "${euser}") == ${ehome} ]]; then
+ return 0
+ fi
+
+ einfo "Updating home for user '${euser}' ..."
einfo " - Home: ${ehome}"
# ensure home directory exists, otherwise update will fail