[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Luke Kanies luke at puppetlabs.com
Tue May 10 08:05:23 UTC 2011


The following commit has been merged in the experimental branch:
commit 66c994ac43347c735f0ea4158b38557d32ec5747
Author: Luke Kanies <luke at puppetlabs.com>
Date:   Thu Feb 24 10:24:08 2011 -0800

    Attempting to skip loading of duplicate actions
    
    Signed-off-by: Luke Kanies <luke at puppetlabs.com>

diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb
index 3fb61c8..1dfb34c 100644
--- a/lib/puppet/interface.rb
+++ b/lib/puppet/interface.rb
@@ -114,6 +114,7 @@ class Puppet::Interface
   def load_actions
     path = "puppet/interface/#{name}"
 
+    loaded = []
     self.class.autoloader.search_directories.each do |dir|
       fdir = ::File.join(dir, path)
       next unless FileTest.directory?(fdir)
@@ -121,6 +122,11 @@ class Puppet::Interface
       Dir.chdir(fdir) do
         Dir.glob("*.rb").each do |file|
           aname = file.sub(/\.rb/, '')
+          if loaded.include?(aname)
+            Puppet.debug "Not loading duplicate action '#{aname}' for '#{name}' from '#{fdir}/#{file}'"
+            next
+          end
+          loaded << aname
           Puppet.debug "Loading action '#{aname}' for '#{name}' from '#{fdir}/#{file}'"
           require "#{path}/#{aname}"
         end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list