From 73c8d0d4701f10995c81633b912bc6dc65a2cf78 Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Sun, 21 Mar 2010 12:07:37 +0100 Subject: 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 --- lib/puppet/parser/functions/require.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser') 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 -- cgit