[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Markus Roberts Markus at reality.com
Wed Jul 14 10:36:55 UTC 2010


The following commit has been merged in the upstream branch:
commit c58e42090f3a1a151406f6a63652c697cb6e687d
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Fri Jul 9 09:55:19 2010 -0700

    [#4180] Support legacy module structure
    
    This patch updates the earlier #4180 patches to support both the old and
    the new module structures.

diff --git a/lib/puppet/indirector/facts/facter.rb b/lib/puppet/indirector/facts/facter.rb
index 75c6529..9d18170 100644
--- a/lib/puppet/indirector/facts/facter.rb
+++ b/lib/puppet/indirector/facts/facter.rb
@@ -10,7 +10,9 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
     def self.load_fact_plugins
         # Add any per-module fact directories to the factpath
         module_fact_dirs = Puppet[:modulepath].split(":").collect do |d|
-            Dir.glob("%s/*/lib/facter" % d)
+            ["lib", "plugins"].map do |subdirectory|
+                Dir.glob("%s/*/#{subdirectory}/facter" % d)
+            end
         end.flatten
         dirs = module_fact_dirs + Puppet[:factpath].split(":")
         x = dirs.each do |dir|
diff --git a/spec/unit/indirector/facts/facter_spec.rb b/spec/unit/indirector/facts/facter_spec.rb
index a6dd886..8f39bad 100755
--- a/spec/unit/indirector/facts/facter_spec.rb
+++ b/spec/unit/indirector/facts/facter_spec.rb
@@ -128,6 +128,7 @@ describe Puppet::Node::Facts::Facter do
 
             Puppet.settings.expects(:value).with(:modulepath).returns("one%stwo" % File::PATH_SEPARATOR)
 
+            Dir.stubs(:glob).returns []
             Dir.expects(:glob).with("one/*/lib/facter").returns %w{oneA oneB}
             Dir.expects(:glob).with("two/*/lib/facter").returns %w{twoA twoB}
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list