summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-03-21 12:07:37 +0100
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit73c8d0d4701f10995c81633b912bc6dc65a2cf78 (patch)
tree7ebdb31406b4f85e55e621e4cfde356d0ca7ed9b /lib/puppet
parentc5a4de28532eaaf8abf2496ca1d4cdc02e5f450a (diff)
downloadpuppet-73c8d0d4701f10995c81633b912bc6dc65a2cf78.tar.gz
puppet-73c8d0d4701f10995c81633b912bc6dc65a2cf78.tar.xz
puppet-73c8d0d4701f10995c81633b912bc6dc65a2cf78.zip
Fix #3186 - require function set relationship only on the last class
Due to the fact that resource.set_parameter is overwriting the previous set_parameters, we were losing the previous relationships we set there, either in a previous call of require or in the same call. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/require.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/require.rb b/lib/puppet/parser/functions/require.rb
index 3e7961933..f634f9fbd 100644
--- a/lib/puppet/parser/functions/require.rb
+++ b/lib/puppet/parser/functions/require.rb
@@ -50,7 +50,7 @@ fail if used with earlier clients.
# but that is considered a containment edge, not a dependency
# edge, so it usually gets lost on the client.
ref = Puppet::Parser::Resource::Reference.new(:type => :class, :title => klass)
- resource.set_parameter(:require, ref)
+ resource.set_parameter(:require, [resource[:require]].flatten.compact << ref)
end
end
end