summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/uvl/luasrc/uvl/dependencies.lua15
1 files changed, 4 insertions, 11 deletions
diff --git a/libs/uvl/luasrc/uvl/dependencies.lua b/libs/uvl/luasrc/uvl/dependencies.lua
index 5b67dffe4a..d19149e7ab 100644
--- a/libs/uvl/luasrc/uvl/dependencies.lua
+++ b/libs/uvl/luasrc/uvl/dependencies.lua
@@ -37,7 +37,7 @@ function _parse_reference( r, c, s, o )
for v in r:gmatch("[^.]+") do
ref[#ref+1] = (v:gsub( "%$(.+)", vars ))
end
-
+
if #ref < 2 then
table.insert(ref, 1, s or '$section')
end
@@ -81,11 +81,7 @@ function check( self, object, nodeps )
for _, dep in ipairs(object:scheme('depends')) do
local subcondition = true
- local score = 0
-
- for k, v in util.spairs(
- dep, function(a, b) return type(dep[a]) == "string" end
- ) do
+ for k, v in pairs(dep) do
-- XXX: better error
local ref = _parse_reference( k, unpack(object.cref) )
@@ -107,13 +103,10 @@ function check( self, object, nodeps )
derr:child(
type(v) == "boolean"
and ERR.DEP_NOVALUE(option, depstr)
- or ERR.DEP_NOTEQUAL(option, {depstr, v}),
- score
+ or ERR.DEP_NOTEQUAL(option, {depstr, v})
)
- --break
- else
- score = score + ( type(v) == "boolean" and 1 or 10 )
+ break
end
else
subcondition = false