Software /
code /
prosody
Changeset
11003:c82ede8892fc
prosodyctl about: Split out libraries into a separate section
Currently libevent and libunbound would show up under Lua modules but
they are not, so a separate section seems more appropriate.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 Jul 2020 03:23:10 +0200 |
parents | 11002:b0766f2603e9 |
children | 11004:d175de07dd73 |
files | prosodyctl |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/prosodyctl Fri Jul 10 03:13:27 2020 +0200 +++ b/prosodyctl Fri Jul 10 03:23:10 2020 +0200 @@ -438,7 +438,7 @@ print(""); print("# Lua module versions"); local module_versions, longest_name = {}, 8; - local luaevent =dependencies.softreq"luaevent"; + local library_versions = {}; dependencies.softreq"ssl"; dependencies.softreq"DBI"; local lunbound = dependencies.softreq"lunbound"; @@ -451,19 +451,24 @@ module_versions[name] = module._VERSION; end end - if luaevent then - module_versions["libevent"] = luaevent.core.libevent_version(); - end if lunbound then if not module_versions["lunbound"] then module_versions["lunbound"] = "<= 0.5"; end - module_versions["libunbound"] = lunbound._LIBVER; + library_versions["libunbound"] = lunbound._LIBVER; end for name, version in sorted_pairs(module_versions) do print(name..":"..string.rep(" ", longest_name-#name), version); end print(""); + print("# library versions"); + if require "net.server".event_base then + library_versions["libevent"] = require"luaevent".core.libevent_version(); + end + for name, version in sorted_pairs(library_versions) do + print(name..":"..string.rep(" ", longest_name-#name), version); + end + print(""); end function commands.reload(arg)