# HG changeset patch # User Matthew Wild # Date 1335186907 -3600 # Node ID 24524d70a50a73e957bec333e29dca47b232ffc6 # Parent 105423f77d46b42b23ac3772e85b806680d3dcf5 moduleapi: module:depends(): Load shared modules onto the current host even if they are loaded globally already diff -r 105423f77d46 -r 24524d70a50a core/moduleapi.lua --- a/core/moduleapi.lua Mon Apr 23 14:11:10 2012 +0100 +++ b/core/moduleapi.lua Mon Apr 23 14:15:07 2012 +0100 @@ -120,6 +120,9 @@ end); end local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name); + if mod and mod.module.host == "*" and modulemanager.module_has_method(mod, "add_host") then + mod = nil; -- This is a shared module, so we still want to load it on our host + end if not mod then local err; mod, err = modulemanager.load(self.host, name);