* [gentoo-dev] [PATCH] savedconfig.eclass: do not re-use config file scheme
@ 2021-10-31 19:20 Mike Gilbert
0 siblings, 0 replies; only message in thread
From: Mike Gilbert @ 2021-10-31 19:20 UTC (permalink / raw
To: gentoo-dev; +Cc: Mike Gilbert
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@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-31 19:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-31 19:20 [gentoo-dev] [PATCH] savedconfig.eclass: do not re-use config file scheme Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox