summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-03-08 04:31:59 +0000
committerJeroen Roovers <jer@gentoo.org>2010-03-08 04:31:59 +0000
commitfaf345f41d8e429773a5b0d3ff6efe852cc9e055 (patch)
tree9e0630bd37e8661fd38b97740d3bfe48d27c5385 /eclass
parentold (diff)
downloadhistorical-faf345f41d8e429773a5b0d3ff6efe852cc9e055.tar.gz
historical-faf345f41d8e429773a5b0d3ff6efe852cc9e055.tar.bz2
historical-faf345f41d8e429773a5b0d3ff6efe852cc9e055.zip
Do not die on first emerge with USE=savedconfig. Be nice in eerror and die messages thanks to Pawel Hajdan, Jr.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/savedconfig.eclass14
1 files changed, 6 insertions, 8 deletions
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index bb01c4886959..0396178bffe0 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.12 2009/10/30 16:46:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.13 2010/03/08 04:31:59 jer Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -111,16 +111,14 @@ restore_config() {
pushd "${found}" > /dev/null
treecopy . "${dest}" || die "Failed to restore ${found} to $1"
popd > /dev/null
- elif [[ -a {found} ]]; then
- die "do not know how to handle non-file/directory ${found}"
else
# maybe the user is screwing around with perms they shouldnt #289168
if [[ ! -r ${base} ]] ; then
- eerror "Unable to read ${base} -- perms are screwed ?"
- die "fix your system"
+ eerror "Unable to read ${base} -- please check its permissions."
+ die "Reading config files failed"
fi
- eerror "No saved config to restore - please remove USE=savedconfig or"
- eerror "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
- die "config file needed when USE=savedconfig is specified"
+ ewarn "No saved config to restore - please remove USE=savedconfig or"
+ ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
+ ewarn "Your config file(s) will not be used this time"
fi
}