Discussion:
[PATCH] plugins: handle missing dependencies more gracefully
Johannes Weißl
2011-03-27 02:56:27 UTC
Permalink
For binary distributions it is not uncommon to install all input/output
plugins, but let the user decide which dependencies to install.
Now cmus silently skips plugins with missing dependencies, and instead
outputs a debug message.
---
input.c | 2 +-
output.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/input.c b/input.c
index dcff162..1c2ffbe 100644
--- a/input.c
+++ b/input.c
@@ -418,7 +418,7 @@ void ip_load_plugins(void)

so = dlopen(filename, RTLD_NOW);
if (so == NULL) {
- error_msg("%s", dlerror());
+ d_print("%s: %s\n", filename, dlerror());
continue;
}

diff --git a/output.c b/output.c
index 5a4f269..baf6a9d 100644
--- a/output.c
+++ b/output.c
@@ -106,7 +106,7 @@ void op_load_plugins(void)

so = dlopen(filename, RTLD_NOW);
if (so == NULL) {
- error_msg("%s", dlerror());
+ d_print("%s: %s\n", filename, dlerror());
continue;
}
--
1.7.4.1
Gregory Petrosyan
2011-03-29 09:09:35 UTC
Permalink
Post by Johannes Weißl
For binary distributions it is not uncommon to install all input/output
plugins, but let the user decide which dependencies to install.
Now cmus silently skips plugins with missing dependencies, and instead
outputs a debug message.
Merged to both maint and master — thanks!

Gregory

Loading...