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 <flop...@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..c7aa8084ac8 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
 
-- 
2.33.1


Reply via email to