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: 1486382029.4a6f0ad3208a0e27a24377c4a2aa3d3cb78517c4.titanofold@gentoo
1 commit: 4a6f0ad3208a0e27a24377c4a2aa3d3cb78517c4
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 6 11:53:49 2017 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 6 11:53:49 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/postgresql/eselect.git/commit/?id=4a6f0ad3
7
8 Remove redundant do_unset() call
9
10 do_set() calls do_unset(). No need to call it before do_set().
11
12 postgresql.eselect | 7 ++-----
13 1 file changed, 2 insertions(+), 5 deletions(-)
14
15 diff --git a/postgresql.eselect b/postgresql.eselect
16 index 83db02f..d7229e5 100644
17 --- a/postgresql.eselect
18 +++ b/postgresql.eselect
19 @@ -382,11 +382,8 @@ do_update() {
20 # may have changed.
21 do_set ${active_slot}
22 elif [[ ${#slots[@]} -ne 0 ]] ; then
23 - # If $slots is not empty but ${active_slot} is set, the active_slot
24 - # must have been unmerged and its links need to be cleaned before...
25 - [[ ${active_slot} != "(none)" ]] && do_unset ${active_slot}
26 -
27 - # Setting the highest slot available.
28 + # If $slots is not empty and active_slot is not in the list, set the
29 + # highest slot available.
30 do_set ${slots[-1]}
31 elif [[ ${active_slot} != "(none)" ]] ; then
32 # If slots is empty, but active_slot still has a value, an unset must