projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c6492df
)
UVL: Fixed dependency handling
author
Steven Barth
<steven@midlink.org>
Thu, 11 Sep 2008 12:58:57 +0000
(12:58 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 11 Sep 2008 12:58:57 +0000
(12:58 +0000)
libs/uvl/luasrc/uvl.lua
patch
|
blob
|
history
diff --git
a/libs/uvl/luasrc/uvl.lua
b/libs/uvl/luasrc/uvl.lua
index
9cdb994
..
f7943d8
100644
(file)
--- a/
libs/uvl/luasrc/uvl.lua
+++ b/
libs/uvl/luasrc/uvl.lua
@@
-663,20
+663,20
@@
end
-- Read a dependency specification
function UVL._read_dependency( self, values, deps )
-- Read a dependency specification
function UVL._read_dependency( self, values, deps )
- local expr = "%$?[
a-zA-Z0-9
_]+"
+ local expr = "%$?[
%w
_]+"
if values then
values = ( type(values) == "table" and values or { values } )
for _, value in ipairs(values) do
local condition = { }
if values then
values = ( type(values) == "table" and values or { values } )
for _, value in ipairs(values) do
local condition = { }
- for val in value:gmatch("[^
%s
,]+") do
- local k,
v = val:match("([^%s=]+)%s*=*%s*([^%s]
*)")
+ for val in value:gmatch("[^,]+") do
+ local k,
e, v = val:match("%s*([%w$_.]+)%s*(=?)%s*(.
*)")
if k and (
k:match("^"..expr.."%."..expr.."%."..expr.."$") or
k:match("^"..expr.."%."..expr.."$") or
k:match("^"..expr.."$")
) then
if k and (
k:match("^"..expr.."%."..expr.."%."..expr.."$") or
k:match("^"..expr.."%."..expr.."$") or
k:match("^"..expr.."$")
) then
- condition[k] = v or true
+ condition[k] =
(e == '=') and
v or true
else
return nil
end
else
return nil
end