aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2017-02-06 06:53:49 -0500
committerAaron W. Swenson <titanofold@gentoo.org>2017-02-06 06:53:49 -0500
commit4a6f0ad3208a0e27a24377c4a2aa3d3cb78517c4 (patch)
treef0dac8e8c1615c72c55806ff475c2c7a962fb496
parentRemove useless reset action (diff)
downloadeselect-4a6f0ad3208a0e27a24377c4a2aa3d3cb78517c4.tar.gz
eselect-4a6f0ad3208a0e27a24377c4a2aa3d3cb78517c4.tar.bz2
eselect-4a6f0ad3208a0e27a24377c4a2aa3d3cb78517c4.zip
Remove redundant do_unset() call
do_set() calls do_unset(). No need to call it before do_set().
-rw-r--r--postgresql.eselect7
1 files changed, 2 insertions, 5 deletions
diff --git a/postgresql.eselect b/postgresql.eselect
index 83db02f..d7229e5 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -382,11 +382,8 @@ do_update() {
# may have changed.
do_set ${active_slot}
elif [[ ${#slots[@]} -ne 0 ]] ; then
- # If $slots is not empty but ${active_slot} is set, the active_slot
- # must have been unmerged and its links need to be cleaned before...
- [[ ${active_slot} != "(none)" ]] && do_unset ${active_slot}
-
- # Setting the highest slot available.
+ # If $slots is not empty and active_slot is not in the list, set the
+ # highest slot available.
do_set ${slots[-1]}
elif [[ ${active_slot} != "(none)" ]] ; then
# If slots is empty, but active_slot still has a value, an unset must