summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-28 21:44:14 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-28 21:44:14 +0000
commit5778eae3693aff665eb0d1d384af31c1d1008386 (patch)
tree5e7cb7f19a8ce02b1eba3ca8c1e35427103bd5d6 /libs
parent8003e3b6482e770483499debdb916d1c08d4d7e5 (diff)
* luci/libs: uvl: invalid wrong "option not found in config" errors
Diffstat (limited to 'libs')
-rw-r--r--libs/uvl/luasrc/uvl.lua7
-rw-r--r--libs/uvl/luasrc/uvl/dependencies.lua4
2 files changed, 9 insertions, 2 deletions
diff --git a/libs/uvl/luasrc/uvl.lua b/libs/uvl/luasrc/uvl.lua
index 37e6b765d0..4ff6e7f3c1 100644
--- a/libs/uvl/luasrc/uvl.lua
+++ b/libs/uvl/luasrc/uvl.lua
@@ -70,6 +70,7 @@ function UVL.__init__( self, schemedir )
self.schemedir = schemedir or default_schemedir
self.packages = { }
self.beenthere = { }
+ self.depseen = { }
self.uci = luci.model.uci
self.err = luci.uvl.errors
self.dep = luci.uvl.dependencies
@@ -124,6 +125,7 @@ function UVL.validate_config( self, config, uci )
local sc = { }
self.beenthere = { }
+ self.depseen = { }
if not co:config() then
return false, co:errors()
@@ -187,6 +189,7 @@ function UVL.validate_section( self, config, section, uci )
local so = co:section( section )
self.beenthere = { }
+ self.depseen = { }
if not co:config() then
return false, co:errors()
@@ -232,6 +235,8 @@ end
function UVL._validate_section( self, section )
+ self.beenthere[section:cid()] = true
+
if section:config() then
if section:scheme('named') == true and
section:config('.anonymous') == true
@@ -268,6 +273,8 @@ end
function UVL._validate_option( self, option, nodeps )
+ self.beenthere[option:cid()] = true
+
if not option:scheme() and not option:parent():scheme('dynamic') then
return false, option:error(ERR.OPT_UNKNOWN(option))
diff --git a/libs/uvl/luasrc/uvl/dependencies.lua b/libs/uvl/luasrc/uvl/dependencies.lua
index 8f960468a7..3aa3c73fa0 100644
--- a/libs/uvl/luasrc/uvl/dependencies.lua
+++ b/libs/uvl/luasrc/uvl/dependencies.lua
@@ -72,8 +72,8 @@ function check( self, object, nodeps )
local derr = ERR.DEPENDENCY(object)
- if not self.beenthere[object:cid()] then
- self.beenthere[object:cid()] = true
+ if not self.depseen[object:cid()] then
+ self.depseen[object:cid()] = true
else
return false, derr:child(ERR.DEP_RECURSIVE(object))
end