self._atommap = {}
self._loaded = False
self._loading = False
+ self.errors = []
def __contains__(self, atom):
return atom in self.getAtoms()
sc.set("config", "class", "portage.sets.files.ConfigFileSet")
sc.set("config", "multiset", "true")
- sc.add_section("categories_installed")
- sc.set("categories_installed", "class", "portage.sets.dbapi.CategorySet")
- sc.set("categories_installed", "multiset", "true")
- sc.set("categories_installed", "repository", "vartree")
- sc.set("categories_installed", "name_pattern", "installed/$category")
+ sc.add_section("user_sets")
+ sc.set("user_sets", "class", "portage.sets.files.StaticFileSet")
+ sc.set("user_sets", "multiset", "true")
return sc
if (not self._loaded or self._mtime != mtime):
try:
data, errors = self.loader.load()
+ for fname in errors:
+ for e in errors[fname]:
+ self.errors.append(fname+": "+e)
except EnvironmentError, e:
if e.errno != errno.ENOENT:
raise
name_pattern = options.get("name_pattern", "sets/$name")
if not "$name" in name_pattern and not "${name}" in name_pattern:
raise SetConfigError("name_pattern doesn't include $name placeholder")
- for filename in os.listdir(directory):
- myname = name_pattern.replace("$name", filename)
- myname = myname.replace("${name}", filename)
- rValue[myname] = StaticFileSet(os.path.join(directory, filename))
+ if os.path.isdir(directory):
+ for filename in os.listdir(directory):
+ myname = name_pattern.replace("$name", filename)
+ myname = myname.replace("${name}", filename)
+ rValue[myname] = StaticFileSet(os.path.join(directory, filename))
return rValue
multiBuilder = classmethod(multiBuilder)
self._lock = None
def singleBuilder(self, options, settings, trees):
- print "world.build"
return WorldSet(settings["ROOT"])
singleBuilder = classmethod(singleBuilder)