[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Pieter van de Bruggen
pieter at puppetlabs.com
Tue May 10 08:10:09 UTC 2011
The following commit has been merged in the experimental branch:
commit 505a48c0d316aad7ff26ae2c0ade294707ca081e
Author: Pieter van de Bruggen <pieter at puppetlabs.com>
Date: Wed Mar 30 15:27:59 2011 -0700
(Maint) Bugfix for failing requires inside Puppet Strings.
Paired-With: Matt Robinson
diff --git a/lib/puppet/string/string_collection.rb b/lib/puppet/string/string_collection.rb
index 45a1927..f8fa38b 100644
--- a/lib/puppet/string/string_collection.rb
+++ b/lib/puppet/string/string_collection.rb
@@ -41,20 +41,21 @@ module Puppet::String::StringCollection
loaded = cache.keys
- files = ["puppet/string/#{name}"]
+ module_names = ["puppet/string/#{name}"]
unless version == :current
- files << "#{name}@#{version}/puppet/string/#{name}"
+ module_names << "#{name}@#{version}/puppet/string/#{name}"
end
- files.each do |file|
+ module_names.each do |module_name|
begin
- require file
- if version == :current || !file.include?('@')
+ require module_name
+ if version == :current || !module_name.include?('@')
loaded = (cache.keys - loaded).first
cache[:current] = cache[loaded] unless loaded.nil?
end
return true if cache.has_key?(version)
- rescue LoadError
+ rescue LoadError => e
+ raise unless e.message =~ /-- #{module_name}$/
# pass
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list