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

Daniel Pittman daniel at rimspace.net
Tue May 10 08:05:36 UTC 2011


The following commit has been merged in the experimental branch:
commit af2c85b5a98ba062a9a58c6c92279f3371d59bb4
Author: Daniel Pittman <daniel at rimspace.net>
Date:   Tue Mar 1 20:33:56 2011 -0800

    (#6551) remove deprecated 'env' parameter to the 'exec' type
    
    We deprecated this back in 0.24, so we can eliminate it in the next release.
    We ran through our deprecation period full of constant complaints to the
    users.  Now we just fail.

diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index daa49e2..033183a 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -211,15 +211,6 @@ module Puppet
       end
     end
 
-    newparam(:env) do
-      desc "This parameter is deprecated. Use 'environment' instead."
-
-      munge do |value|
-        warning "'env' is deprecated on exec; use 'environment' instead."
-        resource[:environment] = value
-      end
-    end
-
     newparam(:environment) do
       desc "Any additional environment variables you want to set for a
         command.  Note that if you use this to set PATH, it will override
diff --git a/test/ral/type/exec.rb b/test/ral/type/exec.rb
index 933994b..829b1a0 100755
--- a/test/ral/type/exec.rb
+++ b/test/ral/type/exec.rb
@@ -609,49 +609,6 @@ class TestExec < Test::Unit::TestCase
     }
   end
 
-  def test_envparam
-
-    exec = Puppet::Type.newexec(
-
-      :command => "echo $envtest",
-      :path => ENV["PATH"],
-
-      :env => "envtest=yayness"
-    )
-
-    assert(exec, "Could not make exec")
-
-    output = status = nil
-    assert_nothing_raised {
-      output, status = exec.run("echo $envtest")
-    }
-
-    assert_equal("yayness\n", output)
-
-    # Now check whether we can do multiline settings
-    assert_nothing_raised do
-      exec[:env] = "envtest=a list of things
-and stuff"
-  end
-
-  output = status = nil
-  assert_nothing_raised {
-    output, status = exec.run('echo "$envtest"')
-    }
-    assert_equal("a list of things\nand stuff\n", output)
-
-    # Now test arrays
-    assert_nothing_raised do
-      exec[:env] = ["funtest=A", "yaytest=B"]
-    end
-
-    output = status = nil
-    assert_nothing_raised {
-      output, status = exec.run('echo "$funtest" "$yaytest"')
-    }
-    assert_equal("A B\n", output)
-  end
-
   def test_environmentparam
 
     exec = Puppet::Type.newexec(

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list