diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-11 20:44:38 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-11 20:44:38 +0000 |
| commit | e287d1e1f1f4ff912ad8c049f8abe44d085011fa (patch) | |
| tree | 65f7cc668024b3da308732e4bec95dfb71695372 /lib/puppet/transaction.rb | |
| parent | 37a059be9538bc90e09a17a45573fc44da6861b4 (diff) | |
| download | puppet-e287d1e1f1f4ff912ad8c049f8abe44d085011fa.tar.gz puppet-e287d1e1f1f4ff912ad8c049f8abe44d085011fa.tar.xz puppet-e287d1e1f1f4ff912ad8c049f8abe44d085011fa.zip | |
Almost all tests now pass. I have basically reached the point where I was before I integrated graphing, except that all of the relationship handling is now inside the transaction, and any kind of recursion (including file) is *tons* easier to model and manage.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1905 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/transaction.rb')
| -rw-r--r-- | lib/puppet/transaction.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index d6d1669a1..99b03b435 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -105,12 +105,16 @@ class Transaction }.uniq end - # Do any necessary cleanup. Basically just removes any generated - # resources. + # Do any necessary cleanup. If we don't get rid of the graphs, the + # contained resources might never get cleaned up. def cleanup @generated.each do |resource| resource.remove end + if defined? @relgraph + @relgraph.clear + end + @resources.clear end # See if the resource generates new resources at evaluation time. @@ -210,8 +214,6 @@ class Transaction # And then close the transaction log. Puppet::Log.close(@report) end - - cleanup() Puppet.debug "Finishing transaction %s with %s changes" % [self.object_id, @count] @@ -235,7 +237,6 @@ class Transaction # enough to check the immediate dependencies, which is why we use # a tree from the reversed graph. skip = false - resource.info "checking for failed deps" @relgraph.reversal.tree_from_vertex(resource, :dfs).keys.each do |dep| if fails = failed?(dep) resource.notice "Dependency %s[%s] has %s failures" % |
