summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-21 00:46:25 -0500
committerLuke Kanies <luke@madstop.com>2008-05-21 00:46:25 -0500
commitbd51a53b0870ee2355c046af255232ec868d8f1d (patch)
tree0a49d107b45718084d2e960c933cdfdc96888147 /lib
parent65c61b99ffb2069205a37f5daa17444984b11ec5 (diff)
downloadpuppet-bd51a53b0870ee2355c046af255232ec868d8f1d.tar.gz
puppet-bd51a53b0870ee2355c046af255232ec868d8f1d.tar.xz
puppet-bd51a53b0870ee2355c046af255232ec868d8f1d.zip
Fixing transaction support for prefetching generated resources.
Previously, we prefetched then generated, which caused generated resources that needed prefetching not to work. This just reorders the calls, so generated resources now get prefetched.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/transaction.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb
index 14b2037f4..b191f8219 100644
--- a/lib/puppet/transaction.rb
+++ b/lib/puppet/transaction.rb
@@ -499,10 +499,12 @@ class Transaction
# Prepare to evaluate the resources in a transaction.
def prepare
- prefetch()
-
# Now add any dynamically generated resources
generate()
+
+ # Then prefetch. It's important that we generate and then prefetch,
+ # so that any generated resources also get prefetched.
+ prefetch()
# This will throw an error if there are cycles in the graph.
@sorted_resources = relationship_graph.topsort