aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2006-07-16 00:41:32 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2006-07-16 00:41:32 +0000
commit4eeeb5eb7bb0e6f5c694ede54fc1566bed6485c6 (patch)
treec07945a423f1ade73c79dd6aac7777289f74b648
parentFixed default thunderbird; directory; bug #139422 - thanks Rodolphe Rocca (diff)
downloadeselect-4eeeb5eb7bb0e6f5c694ede54fc1566bed6485c6.tar.gz
eselect-4eeeb5eb7bb0e6f5c694ede54fc1566bed6485c6.tar.bz2
eselect-4eeeb5eb7bb0e6f5c694ede54fc1566bed6485c6.zip
Fix check for whether implementations are available before attempting to switch to them. This fixes switching based on name rather than number.
svn path=/trunk/; revision=286
-rw-r--r--ChangeLog6
-rw-r--r--libs/skel.bash.in9
2 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c4c468..cf42085 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
ChangeLog for eselect
+2006-07-15 Donnie Berkholz <spyderous@gentoo.org>
+
+ * libs/skel.bash.in:
+ Fix check for whether implementations are available before attempting to
+ switch to them. This fixes switching based on name rather than number.
+
2006-07-07 Kevin F. Quinn <kevquinn@gentoo.org>
* modules/tbirddict.eselect: Fixed default thunderbird;
diff --git a/libs/skel.bash.in b/libs/skel.bash.in
index 9e90c55..065e3c9 100644
--- a/libs/skel.bash.in
+++ b/libs/skel.bash.in
@@ -228,13 +228,8 @@ do_set() {
else
# Only attempt to switch to an implementation if it's available
# for that libdir
- if has ${file##*/} $(find_implems ${iface} ${libdir}); then
- if ! [[ -f ${file} ]] ; then
- fail=1
- echo "Pattern doesn't match anything in ${libdir}: ${item}"
- continue
- fi
- if ! switch_implem ${iface} ${libdir} ${file##*/}; then
+ if has ${item} $(find_implems ${iface} ${libdir}); then
+ if ! switch_implem ${iface} ${libdir} ${item}; then
fail=1
echo "Failed to switch to implementation \"${item}\" for libdir \"${libdir}\"!"
continue