summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-01-14 09:30:30 -0800
committerLuke Kanies <luke@madstop.com>2008-01-14 09:30:30 -0800
commit488c43771aea482e0212b605bde054bf8cb0533c (patch)
tree9be9df23afa85c49e3639871ac07abc4db36edc6 /lib
parent5bef4a55b3489a6404ee34b900621af8b784749a (diff)
downloadpuppet-488c43771aea482e0212b605bde054bf8cb0533c.tar.gz
puppet-488c43771aea482e0212b605bde054bf8cb0533c.tar.xz
puppet-488c43771aea482e0212b605bde054bf8cb0533c.zip
Fixing automatic relationships. I was previously looking them
up in the relationship graph, which only stores the vertices, not the resource table.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/node/catalog.rb2
-rw-r--r--lib/puppet/transaction.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb
index 4d5100c1d..ff41031e1 100644
--- a/lib/puppet/node/catalog.rb
+++ b/lib/puppet/node/catalog.rb
@@ -328,7 +328,7 @@ class Puppet::Node::Catalog < Puppet::PGraph
# Lastly, add in any autorequires
@relationship_graph.vertices.each do |vertex|
- vertex.autorequire(@relationship_graph).each do |edge|
+ vertex.autorequire(self).each do |edge|
unless @relationship_graph.edge?(edge.source, edge.target) # don't let automatic relationships conflict with manual ones.
unless @relationship_graph.edge?(edge.target, edge.source)
vertex.debug "Autorequiring %s" % [edge.source]
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb
index e1ad6eb58..b5fbf2b0a 100644
--- a/lib/puppet/transaction.rb
+++ b/lib/puppet/transaction.rb
@@ -505,7 +505,7 @@ class Transaction
# Now add any dynamically generated resources
generate()
-
+
# This will throw an error if there are cycles in the graph.
@sorted_resources = relationship_graph.topsort
end