Gentoo Archives: gentoo-commits

From: Aaron Swenson <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/postgresql/eselect:stateless commit in: /
Date: Mon, 06 Feb 2017 13:19:48
Message-Id: 1486381793.fec9c553ad737a3fe6b5fae6f07b02d84ce6f7bc.titanofold@gentoo
1 commit: fec9c553ad737a3fe6b5fae6f07b02d84ce6f7bc
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 6 11:49:53 2017 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 6 11:49:53 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/postgresql/eselect.git/commit/?id=fec9c553
7
8 Remove useless reset action
9
10 The reset action is usless as do_set calls do_unset if active_slot is
11 something other than (none).
12
13 postgresql.eselect | 16 ++--------------
14 1 file changed, 2 insertions(+), 14 deletions(-)
15
16 diff --git a/postgresql.eselect b/postgresql.eselect
17 index 67f7b74..83db02f 100644
18 --- a/postgresql.eselect
19 +++ b/postgresql.eselect
20 @@ -328,18 +328,6 @@ do_unset() {
21 done
22 }
23
24 -### Reset Action ###
25 -describe_reset() {
26 - echo "Recreate symbolic links for currently active slot."
27 -}
28 -
29 -do_reset() {
30 - local slot=$(active_slot)
31 - [[ ${slot} == "(none)" ]] && die -q "No active slot to reset."
32 - do_unset ${slot}
33 - do_set ${slot}
34 -}
35 -
36 ### Update Action ###
37 describe_update() {
38 echo "Refreshes all symbolic links managed by this module"
39 @@ -390,9 +378,9 @@ do_update() {
40 local slots=($(get_slots))
41
42 if [[ ${slots[@]} =~ ${active_slot} ]] ; then
43 - # If active_slot is in the slots list, do a reset as the installation
44 + # If active_slot is in the slots list, set it again as the installation
45 # may have changed.
46 - do_reset
47 + do_set ${active_slot}
48 elif [[ ${#slots[@]} -ne 0 ]] ; then
49 # If $slots is not empty but ${active_slot} is set, the active_slot
50 # must have been unmerged and its links need to be cleaned before...