summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-09-26 17:56:50 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-09-26 17:56:50 +0100
commitb53e3f1151cd41ddd0dae955d00ce4d10cdf2506 (patch)
tree874255e9625acb2d162ad1d68daeebb88176a2b1
parent5ee4d91e96b3d0d42a6a6ac0bb089a0a2921f664 (diff)
downloadrabbitmq-server-git-b53e3f1151cd41ddd0dae955d00ce4d10cdf2506.tar.gz
make rabbitmq-plugins more social
-rw-r--r--packaging/debs/Debian/debian/rules3
-rw-r--r--packaging/macports/Portfile.in2
-rw-r--r--src/rabbit_plugins.erl27
3 files changed, 16 insertions, 16 deletions
diff --git a/packaging/debs/Debian/debian/rules b/packaging/debs/Debian/debian/rules
index 9f40ef31e4..108b1ed512 100644
--- a/packaging/debs/Debian/debian/rules
+++ b/packaging/debs/Debian/debian/rules
@@ -14,9 +14,8 @@ DOCDIR=$(DEB_DESTDIR)usr/share/doc/rabbitmq-server/
install/rabbitmq-server::
mkdir -p $(DOCDIR)
rm $(RABBIT_LIB)LICENSE* $(RABBIT_LIB)INSTALL*
- for script in rabbitmqctl rabbitmq-server; do \
+ for script in rabbitmqctl rabbitmq-server rabbitmq-plugins; do \
install -p -D -m 0755 debian/rabbitmq-script-wrapper $(DEB_DESTDIR)usr/sbin/$$script; \
done
- install -p -D -m 0755 debian/rabbitmq-simple-script-wrapper $(DEB_DESTDIR)usr/sbin/rabbitmq-plugins
sed -e 's|@RABBIT_LIB@|/usr/lib/rabbitmq/lib/rabbitmq_server-$(DEB_UPSTREAM_VERSION)|g' <debian/postrm.in >debian/postrm
install -p -D -m 0755 debian/rabbitmq-server.ocf $(DEB_DESTDIR)usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server
diff --git a/packaging/macports/Portfile.in b/packaging/macports/Portfile.in
index d5da3f9299..d847235ed4 100644
--- a/packaging/macports/Portfile.in
+++ b/packaging/macports/Portfile.in
@@ -93,7 +93,7 @@ post-destroot {
xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
${wrappersbin}/rabbitmq-server
- xinstall -m 555 ${filespath}/rabbitmq-simple-script-wrapper \
+ xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
${wrappersbin}/rabbitmq-plugins
reinplace -E "s:MACPORTS_PREFIX/bin:${prefix}/bin:" \
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl
index ca86b618a3..809c4e01f9 100644
--- a/src/rabbit_plugins.erl
+++ b/src/rabbit_plugins.erl
@@ -98,8 +98,12 @@ action(enable, ToEnable0, _Opts) ->
NewEnabled = plugin_names(merge_plugin_lists(EnabledPlugins, ToEnablePlugins)),
update_enabled_plugins(NewEnabled),
case NewEnabled -- ImplicitlyEnabled of
- [] -> ok;
- _ -> io:format("Plugin configuration has changed. "
+ [] -> io:format("Plugin configuration unchanged.~n");
+ _ -> NewImplicitlyEnabled =
+ calculate_required_plugins(NewEnabled, AllPlugins),
+ io:format("The following plugins have been enabled: ~p~n",
+ [NewImplicitlyEnabled -- ImplicitlyEnabled]),
+ io:format("Plugin configuration has changed. "
"You should restart RabbitMQ.~n")
end;
@@ -115,19 +119,16 @@ action(disable, ToDisable0, _Opts) ->
end,
ToDisable1 = ToDisable -- Missing,
ToDisable2 = calculate_dependencies(true, ToDisable1, AllPlugins),
- AlsoDisabled = sets:to_list(
- sets:intersection(sets:from_list(ToDisable2 -- ToDisable1),
- sets:from_list(Enabled))),
- case AlsoDisabled of
- [] -> ok;
- _ -> io:format("Warning: the following plugins will also be disabled "
- "because their dependencies are no longer met: ~p~n",
- [AlsoDisabled])
- end,
NewEnabled = Enabled -- ToDisable2,
case length(Enabled) =:= length(NewEnabled) of
- true -> ok;
- false -> update_enabled_plugins(NewEnabled),
+ true -> io:format("Plugin configuration unchanged.~n");
+ false -> ImplicitlyEnabled =
+ calculate_required_plugins(Enabled, AllPlugins),
+ NewImplicitlyEnabled =
+ calculate_required_plugins(NewEnabled, AllPlugins),
+ io:format("The following plugins have been disabled: ~p~n",
+ [ImplicitlyEnabled -- NewImplicitlyEnabled]),
+ update_enabled_plugins(NewEnabled),
io:format("Plugin configuration has changed. "
"You should restart RabbitMQ.~n")
end.