diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-16 15:50:33 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-16 15:50:33 +0000 |
commit | 976603f0a7106e11211dda8f34e250e1860362a6 (patch) | |
tree | 6b671ea8363326b8e38b86889f1be5f082447665 /lualib/lua_squeeze_rules.lua | |
parent | 8bfc39be4c5538800bf6da3bfe3dbd5827fa58e5 (diff) | |
download | rspamd-976603f0a7106e11211dda8f34e250e1860362a6.tar.gz rspamd-976603f0a7106e11211dda8f34e250e1860362a6.zip |
[Fix] Fix external dependencies
Diffstat (limited to 'lualib/lua_squeeze_rules.lua')
-rw-r--r-- | lualib/lua_squeeze_rules.lua | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lualib/lua_squeeze_rules.lua b/lualib/lua_squeeze_rules.lua index 3511c1b19..9bcccf6f0 100644 --- a/lualib/lua_squeeze_rules.lua +++ b/lualib/lua_squeeze_rules.lua @@ -169,9 +169,21 @@ exports.squeeze_init = function() for parent,children in pairs(squeezed_deps) do if not squeezed_symbols[parent] then -- Trivial case, external dependnency - logger.debugm(SN, rspamd_config, 'register external squeezed dependency on %s', - parent) - rspamd_config:register_dependency(squeeze_sym, parent, true) + + for s,_ in pairs(children) do + + if squeezed_symbols[s] then + -- External dep depends on a squeezed symbol + logger.debugm(SN, rspamd_config, 'register external squeezed dependency on %s', + parent) + rspamd_config:register_dependency(squeeze_sym, parent, true) + else + -- Generic rspamd symbols dependency + logger.debugm(SN, rspamd_config, 'register external dependency %s -> %s', + s, parent) + rspamd_config:register_dependency(s, parent, true) + end + end else -- Not so trivial case local ps = squeezed_symbols[parent] |