Actions
Bug #2768
closedimporting classes partially fails when dynamic modulepath has multiple entries
Status:
Rejected
Priority:
High
Assignee:
-
Category:
Puppet
Target version:
-
Description
Hi,
with an modulepath of the form '/srv/puppet/$environment/modules:/srv/puppet_mac/$environment/modules', the smart proxy will only see modules from the second component.
Please apply the following patch to fix this:
--- environment.rb.orig 2013-07-10 13:28:19.945539637 +0200 +++ environment.rb.fixed 2013-07-10 13:28:34.508591835 +0200 @@ -75,7 +75,7 @@ # Dynamic environments - get every directory under the modulepath Dir.glob("#{base_dir.gsub(/\$environment(.*)/,"/")}/*").grep(/\/[A-Za-z0-9_]+$/) do |dir| e = dir.split("/").last - new_env[e.to_sym] = base_dir.gsub("$environment", e) + new_env[e.to_sym] = [new_env[e.to_sym], base_dir.gsub("$environment", e)].flatten.reject{|d|d.nil?}.join(":") end end end
Actions