aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lpm.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 3f2a6ab..645d5fc 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -932,10 +932,15 @@ function Addon:get_orphaned_dependencies(bottle)
local installed_addons = system_bottle:installed_addons()
for id, options in pairs(self.dependencies) do
local dependency = bottle:get_addon(id, options.version)
- if dependency and (dependency.type == "meta" or dependency:is_installed(bottle)) and not dependency:is_explicitly_installed(bottle) and #common.grep(installed_addons, function(addon) return addon ~= self and addon:depends_on(dependency) end) == 0 then
- table.insert(t, dependency)
- if dependency.type == "meta" then
- t = common.concat(t, dependency:get_orphaned_dependencies(bottle))
+ if dependency then
+ if ( dependency.type == "meta" or dependency:is_installed(bottle) )
+ and #common.grep(installed_addons, function(addon) return addon ~= self and addon:depends_on(dependency) end) == 0
+ and not ( dependency:is_explicitly_installed(bottle) or dependency:is_core(bottle) )
+ then
+ table.insert(t, dependency)
+ if dependency.type == "meta" then
+ t = common.concat(t, dependency:get_orphaned_dependencies(bottle))
+ end
end
end
end