1 |
commit: eb71dfec11e09ae40ae90f27305948097b6591a2 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 31 19:16:06 2021 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 5 19:17:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb71dfec |
7 |
|
8 |
savedconfig.eclass: do not re-use config file scheme |
9 |
|
10 |
This causes file collisions when save_config is used in a multi-slotted |
11 |
package and the config file is named ${PN}. |
12 |
|
13 |
Reverts: a0c35ad8ee8f8f89ba6044dd5b44e9479c6a1775 |
14 |
Bug: https://bugs.gentoo.org/686348 |
15 |
Closes: https://bugs.gentoo.org/818904 |
16 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
17 |
|
18 |
eclass/savedconfig.eclass | 15 +-------------- |
19 |
1 file changed, 1 insertion(+), 14 deletions(-) |
20 |
|
21 |
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass |
22 |
index c4fd0c492f4..20669c08b33 100644 |
23 |
--- a/eclass/savedconfig.eclass |
24 |
+++ b/eclass/savedconfig.eclass |
25 |
@@ -39,13 +39,6 @@ case ${EAPI} in |
26 |
*) die "EAPI=${EAPI:-0} is not supported" ;; |
27 |
esac |
28 |
|
29 |
-# @ECLASS-VARIABLE: _SAVEDCONFIG_CONFIGURATION_FILE |
30 |
-# @DEFAULT_UNSET |
31 |
-# @INTERNAL |
32 |
-# @DESCRIPTION: |
33 |
-# Path of configuration file, relative to /etc/portage/savedconfig, |
34 |
-# restored by restore_config() and saved by save_config(). |
35 |
- |
36 |
# @FUNCTION: save_config |
37 |
# @USAGE: <config files to save> |
38 |
# @DESCRIPTION: |
39 |
@@ -59,12 +52,7 @@ save_config() { |
40 |
fi |
41 |
[[ $# -eq 0 ]] && die "Usage: save_config <files>" |
42 |
|
43 |
- local configfile |
44 |
- if [[ -n ${_SAVEDCONFIG_CONFIGURATION_FILE} ]] ; then |
45 |
- configfile="/etc/portage/savedconfig/${_SAVEDCONFIG_CONFIGURATION_FILE}" |
46 |
- else |
47 |
- configfile="/etc/portage/savedconfig/${CATEGORY}/${PF}" |
48 |
- fi |
49 |
+ local configfile="/etc/portage/savedconfig/${CATEGORY}/${PF}" |
50 |
|
51 |
if [[ $# -eq 1 && -f $1 ]] ; then |
52 |
# Just one file, so have the ${configfile} be that config file |
53 |
@@ -125,7 +113,6 @@ restore_config() { |
54 |
if [[ -r "${configfile}" ]] ; then |
55 |
einfo "Found \"${configfile}\"" |
56 |
found=${configfile} |
57 |
- _SAVEDCONFIG_CONFIGURATION_FILE=${configfile#${base}/} |
58 |
break |
59 |
fi |