diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-16 16:27:27 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-16 16:27:27 +0000 |
| commit | 5f8d61553a9d83087604fe5b68146503cf55d1be (patch) | |
| tree | 48ce04255a2eab6c7439f8db9fa3549cd4faab47 /lib | |
| parent | 6cc8157fb0e36f2435b201abad81affe3b8e17ac (diff) | |
| download | puppet-5f8d61553a9d83087604fe5b68146503cf55d1be.tar.gz puppet-5f8d61553a9d83087604fe5b68146503cf55d1be.tar.xz puppet-5f8d61553a9d83087604fe5b68146503cf55d1be.zip | |
Removed some of the autorequire stuff from :exec because it created untenable require loops, and created a test case for some complicated exec + file recursion. The test case fails, and I want to have a clean committed repository before i mess much more in trying to fix it, which might actually not be possible.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@921 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type.rb | 4 | ||||
| -rwxr-xr-x | lib/puppet/type/exec.rb | 7 | ||||
| -rwxr-xr-x | lib/puppet/type/pfile/mode.rb | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 717c566eb..748a69906 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -1383,7 +1383,9 @@ class Type < Puppet::Element obj = dep else # Skip autorequires that we aren't managing - next unless obj = typeobj[dep] + unless obj = typeobj[dep] + next + end end # Skip autorequires that we already require diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb index 0fec635c8..b12bf159d 100755 --- a/lib/puppet/type/exec.rb +++ b/lib/puppet/type/exec.rb @@ -392,7 +392,12 @@ module Puppet reqs << self[:cwd] end - [:command, :onlyif, :unless].each { |param| + self[:command].scan(/^(#{File::SEPARATOR}\S+)/) { |str| + self.warning "adding %s" % str + reqs << str + } + + [:onlyif, :unless].each { |param| next unless tmp = self[param] # And search the command line for files, adding any we find. This diff --git a/lib/puppet/type/pfile/mode.rb b/lib/puppet/type/pfile/mode.rb index 455d52ce1..3d593caef 100755 --- a/lib/puppet/type/pfile/mode.rb +++ b/lib/puppet/type/pfile/mode.rb @@ -93,7 +93,7 @@ module Puppet if @is == :absent @parent.stat(true) self.retrieve - #self.debug "%s: after refresh, is '%s'" % [self.class.name,@is] + self.debug "%s: after refresh, is '%o'" % [self.class.name,@is] if @is == :absent self.info "File does not exist; cannot set mode" % @parent.name |
