summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/type/package.rb8
-rwxr-xr-xspec/unit/ral/types/package.rb4
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/puppet/type/package.rb b/lib/puppet/type/package.rb
index ee2871ce2..f004f7c42 100644
--- a/lib/puppet/type/package.rb
+++ b/lib/puppet/type/package.rb
@@ -211,14 +211,6 @@ module Puppet
desc "Where to find the actual package. This must be a local file
(or on a network file system) or a URL that your specific
packaging type understands; Puppet will not retrieve files for you."
-
- validate do |value|
- unless value =~ /^#{File::SEPARATOR}/ or value =~ /\w+:\/\//
- self.fail(
- "Package sources must be fully qualified files or URLs, depending on the platform."
- )
- end
- end
end
newparam(:instance) do
desc "A read-only parameter set by the package."
diff --git a/spec/unit/ral/types/package.rb b/spec/unit/ral/types/package.rb
index 785d2eb37..5d96dc4ae 100755
--- a/spec/unit/ral/types/package.rb
+++ b/spec/unit/ral/types/package.rb
@@ -94,8 +94,8 @@ describe Puppet::Type::Package, "when validating attribute values" do
proc { Puppet::Type::Package.create(:name => "yay", :ensure => "1.0") }.should raise_error(Puppet::Error)
end
- it "should only accept files and URLs as values to :source" do
- proc { Puppet::Type::Package.create(:name => "yay", :source => "stuff") }.should raise_error(Puppet::Error)
+ it "should accept any string as an argument to :source" do
+ proc { Puppet::Type::Package.create(:name => "yay", :source => "stuff") }.should_not raise_error(Puppet::Error)
end
after { Puppet::Type::Package.clear }