diff options
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Collection.py | 4 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/PkgVars.py | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py b/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py index ccb526a19..e0d6e1fc3 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py @@ -311,7 +311,7 @@ class Collection(list, Debuggable): pin_source = pinnings[package] for source in self: - if pin_source and pin_source != source.name: + if pin_source and source.name not in pin_source: continue pin_found = True @@ -321,7 +321,7 @@ class Collection(list, Debuggable): if not pin_found: if pin_source: self.logger.error("Packages: Source '%s' for package '%s' not found" % - (pin_source, package)) + (' or '.join(pin_source), package)) else: self.logger.error("Packages: No source found for package '%s'" % package); diff --git a/src/lib/Bcfg2/Server/Plugins/PkgVars.py b/src/lib/Bcfg2/Server/Plugins/PkgVars.py index a085ea17e..9a2649d02 100644 --- a/src/lib/Bcfg2/Server/Plugins/PkgVars.py +++ b/src/lib/Bcfg2/Server/Plugins/PkgVars.py @@ -19,7 +19,12 @@ class PkgVarsFile(Bcfg2.Server.Plugin.StructFile): for v in vars: value = d.get(v, None) if value: - results[v][name] = value + if v not in results: + results[v] = {} + if name not in results[v]: + results[v][name] = set() + + results[v][name].add(value) return results @@ -35,7 +40,8 @@ class PkgVarsDirectoryBacked(Bcfg2.Server.Plugin.DirectoryBacked): for files in self.entries: new = self.entries[files].get_additional_data(meta) for x in vars: - results[x].update(new[x]) + if x in new: + results[x].update(new[x]) return results |