summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-06-14 13:53:56 -0500
committerLuke Kanies <luke@madstop.com>2008-06-14 13:53:56 -0500
commit6a61198f9293674a4bf0aa75bfbca10e20f64d20 (patch)
tree0b1b6c4ffe6e69c3c9d3e9650620e3afbd486f18 /lib/puppet/parser
parenteaa6eabc680cb6264594e30fd6a56e3e36765269 (diff)
parent7b2c310e18b214424ae082e6ed2354a07b708c6f (diff)
downloadpuppet-6a61198f9293674a4bf0aa75bfbca10e20f64d20.tar.gz
puppet-6a61198f9293674a4bf0aa75bfbca10e20f64d20.tar.xz
puppet-6a61198f9293674a4bf0aa75bfbca10e20f64d20.zip
Merge branch '0.24.x'
Also added the fixes to make the certhandler tests pass even when certs exist; I'll deal with the conflict later. Conflicts: CHANGELOG bin/puppetd lib/puppet/network/http/handler.rb lib/puppet/network/http/mongrel/rest.rb spec/integration/indirector/rest.rb spec/integration/network/server/mongrel.rb spec/integration/network/server/webrick.rb spec/unit/network/http/webrick.rb
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/collector.rb6
-rw-r--r--lib/puppet/parser/grammar.ra4
-rw-r--r--lib/puppet/parser/parser.rb8
3 files changed, 12 insertions, 6 deletions
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb
index 2699dc6e1..bcba9528e 100644
--- a/lib/puppet/parser/collector.rb
+++ b/lib/puppet/parser/collector.rb
@@ -6,6 +6,12 @@ class Puppet::Parser::Collector
# Call the collection method, mark all of the returned objects as non-virtual,
# and then delete this object from the list of collections to evaluate.
def evaluate
+ # Shortcut if we're not using storeconfigs and they're trying to collect
+ # exported resources.
+ if form == :exported and Puppet[:storeconfigs] != true
+ Puppet.warning "Not collecting exported resources without storeconfigs"
+ return false
+ end
if self.resources
if objects = collect_resources and ! objects.empty?
return objects
diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra
index 484efe83c..a2f6729ee 100644
--- a/lib/puppet/parser/grammar.ra
+++ b/lib/puppet/parser/grammar.ra
@@ -152,7 +152,7 @@ virtualresource: at resource {
type = val[0]
if (type == :exported and ! Puppet[:storeconfigs]) and ! Puppet[:parseonly]
- error "You cannot collect without storeconfigs being set"
+ Puppet.warning addcontext("You cannot collect without storeconfigs being set")
end
if val[1].is_a? AST::ResourceDefaults
@@ -193,7 +193,7 @@ collection: classref collectrhand {
args[:form] = val[1]
end
if args[:form] == :exported and ! Puppet[:storeconfigs] and ! Puppet[:parseonly]
- error "You cannot collect exported resources without storeconfigs being set"
+ Puppet.warning addcontext("You cannot collect exported resources without storeconfigs being set; the collection will be ignored")
end
result = ast AST::Collection, args
}
diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb
index e27a209fc..3d7f21dca 100644
--- a/lib/puppet/parser/parser.rb
+++ b/lib/puppet/parser/parser.rb
@@ -29,7 +29,7 @@ module Puppet
class Parser < Racc::Parser
-module_eval <<'..end grammar.ra modeval..idfef5d70c9f', 'grammar.ra', 638
+module_eval <<'..end grammar.ra modeval..id9145566289', 'grammar.ra', 638
# It got too annoying having code in a file that needs to be compiled.
require 'puppet/parser/parser_support'
@@ -41,7 +41,7 @@ require 'puppet/parser/parser_support'
# $Id$
-..end grammar.ra modeval..idfef5d70c9f
+..end grammar.ra modeval..id9145566289
##### racc 1.4.5 generates ###
@@ -958,7 +958,7 @@ module_eval <<'.,.,', 'grammar.ra', 174
type = val[0]
if (type == :exported and ! Puppet[:storeconfigs]) and ! Puppet[:parseonly]
- error "You cannot collect without storeconfigs being set"
+ Puppet.warning addcontext("You cannot collect without storeconfigs being set")
end
if val[1].is_a? AST::ResourceDefaults
@@ -1011,7 +1011,7 @@ module_eval <<'.,.,', 'grammar.ra', 199
args[:form] = val[1]
end
if args[:form] == :exported and ! Puppet[:storeconfigs] and ! Puppet[:parseonly]
- error "You cannot collect exported resources without storeconfigs being set"
+ Puppet.warning addcontext("You cannot collect exported resources without storeconfigs being set; the collection will be ignored")
end
result = ast AST::Collection, args
result