diff options
| author | Luke Kanies <luke@madstop.com> | 2009-04-17 01:08:53 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-04-17 16:17:58 +1000 |
| commit | 7ab7d9f9ff378041ab7a2baf159860439bd1c812 (patch) | |
| tree | a6ea8eb9eb8f2b021206e79f53e2a97e8a0c90f1 /lib/puppet/transaction.rb | |
| parent | 84e6c1bd95f32810e92eb760fe3f3f9efdb84f04 (diff) | |
| download | puppet-7ab7d9f9ff378041ab7a2baf159860439bd1c812.tar.gz puppet-7ab7d9f9ff378041ab7a2baf159860439bd1c812.tar.xz puppet-7ab7d9f9ff378041ab7a2baf159860439bd1c812.zip | |
Fixing #2112 - Transactions handle conflicting generated resources
This commit rips out all of the 'implicit resource' crap,
replacing it with a simple system that just skips
resources that the catalog says are in conflict.
Removes a bunch of code, and fixes the bug to boot.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/transaction.rb')
| -rw-r--r-- | lib/puppet/transaction.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index bb5adc383..37f51b2e5 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -343,9 +343,15 @@ class Transaction made = [made] unless made.is_a?(Array) made.uniq! made.each do |res| - @catalog.add_resource(res) { |r| r.finish } + begin + @catalog.add_resource(res) do |r| + r.finish + make_parent_child_relationship(resource, [r]) + end + rescue Puppet::Resource::Catalog::DuplicateResourceError + next + end end - make_parent_child_relationship(resource, made) made end |
