diff options
| author | Luke Kanies <luke@madstop.com> | 2008-01-20 21:21:37 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-01-20 21:21:37 -0800 |
| commit | 8a649ff28a46afe6b1e4dd002ac90c93651edfa3 (patch) | |
| tree | 709a701e2e6de344ca6561da29a49e32fef6cf19 /lib/puppet/util/settings.rb | |
| parent | 52eba77e15e74f93d88a5763ca891a53de60b538 (diff) | |
| download | puppet-8a649ff28a46afe6b1e4dd002ac90c93651edfa3.tar.gz puppet-8a649ff28a46afe6b1e4dd002ac90c93651edfa3.tar.xz puppet-8a649ff28a46afe6b1e4dd002ac90c93651edfa3.zip | |
I think I've finally fixed #959, by having the Settings
class skip any resources that are already in memory.
Diffstat (limited to 'lib/puppet/util/settings.rb')
| -rw-r--r-- | lib/puppet/util/settings.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb index b672d9564..ff019edb8 100644 --- a/lib/puppet/util/settings.rb +++ b/lib/puppet/util/settings.rb @@ -510,18 +510,19 @@ class Puppet::Util::Settings end # Only files are convertable to transportable resources. - if obj.respond_to? :to_transportable - next if value(obj.name) =~ /^\/dev/ - transobjects = obj.to_transportable - transobjects = [transobjects] unless transobjects.is_a? Array - transobjects.each do |trans| - # transportable could return nil - next unless trans - unless done[:file].include? trans.name - @created << trans.name - objects << trans - done[:file][trans.name] = trans - end + next unless obj.respond_to? :to_transportable + next if value(obj.name) =~ /^\/dev/ + next if Puppet::Type::File[obj.value] # skip files that are in our global resource list. + + transobjects = obj.to_transportable + transobjects = [transobjects] unless transobjects.is_a? Array + transobjects.each do |trans| + # transportable could return nil + next unless trans + unless done[:file].include? trans.name + @created << trans.name + objects << trans + done[:file][trans.name] = trans end end end |
