summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions/require.rb
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-03-21 12:07:37 +0100
committerJames Turnbull <james@lovedthanlost.net>2010-03-24 08:15:07 +1100
commit751df45547162632c41cf98a1b1daabbadb1b901 (patch)
tree6bef1b3ef4daa80cf0073f639f1c376f8fd6a744 /lib/puppet/parser/functions/require.rb
parenta1d216c74ee7245e0edaaba7d9384b59d442bcf2 (diff)
downloadpuppet-751df45547162632c41cf98a1b1daabbadb1b901.tar.gz
puppet-751df45547162632c41cf98a1b1daabbadb1b901.tar.xz
puppet-751df45547162632c41cf98a1b1daabbadb1b901.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/parser/functions/require.rb')
-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