-- @return Instance object
UVL = util.class()
-function UVL.__init__( self, schemedir )
+function UVL.__init__( self, schemedir, configdir )
self.schemedir = schemedir or default_schemedir
+ self.configdir = configdir
self.packages = { }
self.beenthere = { }
self.depseen = { }
end
end
-function uvlitem._loadconf(self, co, c)
+function uvlitem._loadconf(self, co, c, configdir)
co = co or self._configcache
if not co then
local err
- co, err = uci.cursor():get_all(c)
+ co, err = uci.cursor(configdir):get_all(c)
if err then
self:error(ERR.UCILOAD(self, err))
self.cref = { c }
self.sref = { c }
- self.c = self:_loadconf(co, c)
+ self.c = self:_loadconf(co, c, scheme.configdir)
self.s = scheme
self.t = TYPE_SCHEME
end
if not c then
c, co = co, nil
end
-
self.cref = { c }
self.sref = { c }
- self.c = self:_loadconf(co, c)
+ self.c = self:_loadconf(co, c, scheme.configdir)
self.s = scheme
self.t = TYPE_CONFIG
end
function section.__init__(self, scheme, co, c, s)
self.cref = { c, s }
self.sref = { c, co and co[s] and co[s]['.type'] or s }
- self.c = self:_loadconf(co, c)
+ self.c = self:_loadconf(co, c, scheme.configdir)
self.s = scheme
self.t = TYPE_SECTION
end
function option.__init__(self, scheme, co, c, s, o)
self.cref = { c, s, o }
self.sref = { c, co and co[s] and co[s]['.type'] or s, o }
- self.c = self:_loadconf(co, c)
+ self.c = self:_loadconf(co, c, scheme.configdir)
self.s = scheme
self.t = TYPE_OPTION
end
function enum.__init__(self, scheme, co, c, s, o, v)
self.cref = { c, s, o, v }
self.sref = { c, co and co[s] and co[s]['.type'] or s, o, v }
- self.c = self:_loadconf(co, c)
+ self.c = self:_loadconf(co, c, scheme.configdir)
self.s = scheme
self.t = TYPE_ENUM
end