Issue #7444 has been reported by Trevor Vaughan.
----------------------------------------
Bug #7444: Ability to load a server side function from a server side function
broken.
https://projects.puppetlabs.com/issues/7444
Author: Trevor Vaughan
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.6
Keywords:
Branch:
In 0.24.9, the preferred way of loading a server side function to be used
within another server side function was to do the following:
require File.join([File.expand_path(File.dirname(__FILE__)), 'filename.rb'])
In 2.6.6, this does not work as Puppet attempts to load the file multiple times
and the puppet run will not continue due to a duplicate load attempting to
happen.
I've worked around this by doing the following, but it's definitely a hack:
begin
function_filename('%test_$string^')
rescue
require File.join([File.expand_path(File.dirname(__FILE__)), 'filename.rb'])
end
In the called function, I just add something to return 'true' if that string is
passed. Massive hack, but I couldn't figure out another way to do it more
elegantly.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.