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

Markus Roberts Markus at reality.com
Tue May 10 08:11:14 UTC 2011


The following commit has been merged in the experimental branch:
commit e17cc651a9625576aa79af428bbaec702e216ac8
Merge: cab567274691e0f39e88d49eb503efbe58d5042c 2a6c6cb8fabf82d2f2127c90db670c1a856427c5
Author: Markus Roberts <Markus at reality.com>
Date:   Wed Apr 6 16:43:15 2011 -0700

    Merge branch 'feature/next/resource_application_order' into next

diff --combined lib/puppet/type/file.rb
index a73ada5,cbc1f77..5632d41
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@@ -122,17 -122,7 +122,17 @@@ Puppet::Type.newtype(:file) d
  
    newparam(:recurse) do
      desc "Whether and how deeply to do recursive
 -      management."
 +      management. Options are:
 +        inf,true  => Regular style recursion on both remote and local
 +                     directory structure.
 +        remote    => Descends recursively into the remote directory
 +                     but not the local directory. Allows copying of
 +                     a few files into a directory containing many
 +                     unmanaged files without scanning all the local files.
 +        false     => Default of no-recursion.
 +        [0-9]+    => Both, but limit recursion. Warning: this syntax
 +                     is deprecated and has moved to recurselimit.
 +    "
  
      newvalues(:true, :false, :inf, :remote, /^[0-9]+$/)
  
@@@ -313,8 -303,6 +313,6 @@@
      return self.new(:name => base, :recurse => true, :recurselimit => 1, :audit => :all).recurse_local.values
    end
  
-   @depthfirst = false
- 
    # Determine the user to write files as.
    def asuser
      if self.should(:owner) and ! self.should(:owner).is_a?(Symbol)
@@@ -474,8 -462,7 +472,7 @@@
    # be used to copy remote files, manage local files, and/or make links
    # to map to another directory.
    def recurse
-     children = {}
-     children = recurse_local if self[:recurse] != :remote
+     children = (self[:recurse] == :remote) ? {} : recurse_local
  
      if self[:target]
        recurse_link(children)
@@@ -512,11 -499,7 +509,7 @@@
  
    # A simple method for determining whether we should be recursing.
    def recurse?
-     return false unless @parameters.include?(:recurse)
- 
-     val = @parameters[:recurse].value
- 
-     !!(val and (val == true or val == :remote))
+     self[:recurse] == true or self[:recurse] == :remote
    end
  
    # Recurse the target of the link.
@@@ -588,13 -571,10 +581,10 @@@
    end
  
    def perform_recursion(path)
- 
      Puppet::FileServing::Metadata.indirection.search(
        path,
        :links => self[:links],
        :recurse => (self[:recurse] == :remote ? true : self[:recurse]),
- 
        :recurselimit => self[:recurselimit],
        :ignore => self[:ignore],
        :checksum_type => (self[:source] || self[:content]) ? self[:checksum] : :none

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list