diff options
authorMike Gilbert <>2021-09-26 19:47:13 -0400
committerMike Gilbert <>2021-09-29 15:32:44 -0400
commitc3c88c805320021786d2bb925918e9ba2d15c79d (patch)
parentdev-perl/Tk-CursorControl: EAPI=8 bump (diff)
savedconfig.eclass: drop faulty permissions check
This check was meant to test if the user has accidentally restricted access to the /etc/portage/savedconfig directory. There are a few problems: 1. We don't actually need read access on the directory. We really need the execute bit set so that we can access files within the directory. 2. There may be permissions issues on subdirectories, and we would fail to detect them. 3. There is no easy way to distingish between EACCES and ENOENT using shell commands. We get an exit status of 1 from [[ -r ${path} ]] if there is a permissions problem or if some component of the path does not exist. This makes resolving problem 2 difficult without using a more robust language with direct access to errno. Instead of trying to detect a permissions problem, just output a warning telling the user to check permissions if we cannot find a config file. Bug: Bug: Signed-off-by: Mike Gilbert <>
1 files changed, 3 insertions, 7 deletions
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index e90a9b618d6..c4fd0c492f4 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: savedconfig.eclass
@@ -146,14 +146,10 @@ restore_config() {
treecopy . "${dest}" || die "Failed to restore ${found} to $1"
popd > /dev/null
- # maybe the user is screwing around with perms they shouldnt #289168
- if [[ ! -r ${base} ]] ; then
- eerror "Unable to read ${base} -- please check its permissions."
- die "Reading config files failed"
- fi
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"
+ ewarn "and ensure the build process has permission to access it."
+ ewarn "Your config file(s) will not be used this time."