commit: eb71dfec11e09ae40ae90f27305948097b6591a2
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 31 19:16:06 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Nov 5 19:17:13 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb71dfec
savedconfig.eclass: do not re-use config file scheme
This causes file collisions when save_config is used in a multi-slotted
package and the config file is named ${PN}.
Reverts: a0c35ad8ee8f8f89ba6044dd5b44e9479c6a1775
Bug: https://bugs.gentoo.org/686348
Closes: https://bugs.gentoo.org/818904
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
eclass/savedconfig.eclass | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index c4fd0c492f4..20669c08b33 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -39,13 +39,6 @@ case ${EAPI} in
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
-# @ECLASS-VARIABLE: _SAVEDCONFIG_CONFIGURATION_FILE
-# @DEFAULT_UNSET
-# @INTERNAL
-# @DESCRIPTION:
-# Path of configuration file, relative to /etc/portage/savedconfig,
-# restored by restore_config() and saved by save_config().
-
# @FUNCTION: save_config
# @USAGE: <config files to save>
# @DESCRIPTION:
@@ -59,12 +52,7 @@ save_config() {
fi
[[ $# -eq 0 ]] && die "Usage: save_config <files>"
- local configfile
- if [[ -n ${_SAVEDCONFIG_CONFIGURATION_FILE} ]] ; then
-
configfile="/etc/portage/savedconfig/${_SAVEDCONFIG_CONFIGURATION_FILE}"
- else
- configfile="/etc/portage/savedconfig/${CATEGORY}/${PF}"
- fi
+ local configfile="/etc/portage/savedconfig/${CATEGORY}/${PF}"
if [[ $# -eq 1 && -f $1 ]] ; then
# Just one file, so have the ${configfile} be that config file
@@ -125,7 +113,6 @@ restore_config() {
if [[ -r "${configfile}" ]] ; then
einfo "Found \"${configfile}\""
found=${configfile}
- _SAVEDCONFIG_CONFIGURATION_FILE=${configfile#${base}/}
break
fi