diff options
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py index 0e27f99f1..829ab0d8c 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py @@ -355,8 +355,8 @@ class Source(Bcfg2.Server.Plugin.Debuggable): self.load_state() except: err = sys.exc_info()[1] - self.logger.error("Packages: Cachefile %s load failed: %s" % - (self.cachefile, err)) + self.logger.error("Packages: Cachefile %s load failed: %s" + % (self.cachefile, err)) self.logger.error("Falling back to file read") try: @@ -514,7 +514,7 @@ class Source(Bcfg2.Server.Plugin.Debuggable): as its final step.""" pass - def process_files(self, deps, prov): + def process_files(self, dependencies, provides): """ Given dicts of depends and provides generated by :func:`read_files`, this generates :attr:`deps` and :attr:`provides` and calls :func:`save_state` to save the @@ -526,43 +526,43 @@ class Source(Bcfg2.Server.Plugin.Debuggable): dependencies for each package the symbols provided by each package. - :param deps: A dict of dependencies found in the metadata for - this source. - :type deps: dict; see above. - :param prov: A dict of symbols provided by packages in this - repository. - :type prov: dict; see above. + :param dependencies: A dict of dependencies found in the + metadata for this source. + :type dependencies: dict; see above. + :param provides: A dict of symbols provided by packages in + this repository. + :type provides: dict; see above. """ self.deps['global'] = dict() self.provides['global'] = dict() - for barch in deps: + for barch in dependencies: self.deps[barch] = dict() self.provides[barch] = dict() for pkgname in self.pkgnames: pset = set() - for barch in deps: - if pkgname not in deps[barch]: - deps[barch][pkgname] = [] - pset.add(tuple(deps[barch][pkgname])) + for barch in dependencies: + if pkgname not in dependencies[barch]: + dependencies[barch][pkgname] = [] + pset.add(tuple(dependencies[barch][pkgname])) if len(pset) == 1: self.deps['global'][pkgname] = pset.pop() else: - for barch in deps: - self.deps[barch][pkgname] = deps[barch][pkgname] + for barch in dependencies: + self.deps[barch][pkgname] = dependencies[barch][pkgname] provided = set() - for bprovided in list(prov.values()): + for bprovided in list(provides.values()): provided.update(set(bprovided)) for prov in provided: prset = set() - for barch in prov: - if prov not in prov[barch]: + for barch in provides: + if prov not in provides[barch]: continue - prset.add(tuple(prov[barch].get(prov, ()))) + prset.add(tuple(provides[barch].get(prov, ()))) if len(prset) == 1: self.provides['global'][prov] = prset.pop() else: - for barch in prov: - self.provides[barch][prov] = prov[barch].get(prov, ()) + for barch in provides: + self.provides[barch][prov] = provides[barch].get(prov, ()) self.save_state() def unknown_filter(self, package): |