diff options
author | Jon Fautley <jon.fautley@fil.com> | 2014-10-29 10:55:42 +0000 |
---|---|---|
committer | Jon Fautley <jon.fautley@fil.com> | 2014-10-29 10:55:42 +0000 |
commit | f40255377ce41653d69f0b91c5b1a8f7d36883c1 (patch) | |
tree | e23575a9c6096193bbbcde960ee95f7bd30c4b0c | |
parent | ecf02352a371e3c4a9c72bf94297f047bc400aa7 (diff) | |
download | puppet-vcsrepo-f40255377ce41653d69f0b91c5b1a8f7d36883c1.tar.gz puppet-vcsrepo-f40255377ce41653d69f0b91c5b1a8f7d36883c1.tar.bz2 |
Revamp debugging output
-rw-r--r-- | lib/puppet/provider/vcsrepo/cvs.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet/provider/vcsrepo/cvs.rb b/lib/puppet/provider/vcsrepo/cvs.rb index 891a5c6..7a8f6ef 100644 --- a/lib/puppet/provider/vcsrepo/cvs.rb +++ b/lib/puppet/provider/vcsrepo/cvs.rb @@ -33,13 +33,13 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) end def latest? - debug "Checking for updates because 'ensure => latest'" + Puppet.debug "Checking for updates because 'ensure => latest'" at_path do # We cannot use -P to prune empty dirs, otherwise # CVS would report those as "missing", regardless # if they have contents or updates. is_current = (runcvs('-nq', 'update', '-d').strip == "") - if (!is_current) then debug "There are updates available on the checkout's current branch/tag." end + if (!is_current) then Puppet.debug "There are updates available on the checkout's current branch/tag." end return is_current end end @@ -62,7 +62,7 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) else @rev = 'HEAD' end - debug "Checkout is on branch/tag '#{@rev}'" + Puppet.debug "Checkout is on branch/tag '#{@rev}'" end return @rev end @@ -119,17 +119,17 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) def runcvs(*args) if @resource.value(:cvs_rsh) - debug "Using CVS_RSH = " + @resource.value(:cvs_rsh) + Puppet.debug "Using CVS_RSH = " + @resource.value(:cvs_rsh) e = { :CVS_RSH => @resource.value(:cvs_rsh) } else e = {} end if @resource.value(:user) and @resource.value(:user) != Facter['id'].value - debug "Running as user " + @resource.value(:user) - Puppet.debug Puppet::Util::Execution.execute("cvs #{args.join(' ')}", :uid => @resource.value(:user), :custom_environment => e) + Puppet.debug "Running as user " + @resource.value(:user) + Puppet::Util::Execution.execute([:cvs, *args], :uid => @resource.value(:user), :custom_environment => e) else - Puppet.debug Puppet::Util::Execution.execute("cvs #{args.join(' ')}", :custom_environment => e) + Puppet::Util::Execution.execute([:cvs, *args], :custom_environment => e) end end end |