diff options
author | Luke Kanies <luke@madstop.com> | 2008-02-11 17:24:02 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-02-11 17:24:02 -0600 |
commit | 6a4cf6c978e8c8aebba4ed0f16d3de7bb31a0ce0 (patch) | |
tree | df96556dd073aa5d0c23c735a2456da8f144f6b9 /lib/puppet/parser/ast/hostclass.rb | |
parent | 3b740ff7a6ab7127ec5e4935782c33245687c429 (diff) | |
download | puppet-6a4cf6c978e8c8aebba4ed0f16d3de7bb31a0ce0.tar.gz puppet-6a4cf6c978e8c8aebba4ed0f16d3de7bb31a0ce0.tar.xz puppet-6a4cf6c978e8c8aebba4ed0f16d3de7bb31a0ce0.zip |
Fixed #1030 - class and definition evaluation has been significantly
refactored, fixing this problem and making the whole interplay
between the classes, definitions, and nodes, and the Compile class much
cleaner.
Diffstat (limited to 'lib/puppet/parser/ast/hostclass.rb')
-rw-r--r-- | lib/puppet/parser/ast/hostclass.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/puppet/parser/ast/hostclass.rb b/lib/puppet/parser/ast/hostclass.rb index 251d5eba6..4f2d00f0c 100644 --- a/lib/puppet/parser/ast/hostclass.rb +++ b/lib/puppet/parser/ast/hostclass.rb @@ -18,6 +18,15 @@ class Puppet::Parser::AST::HostClass < Puppet::Parser::AST::Definition end end + # Make sure our parent class has been evaluated, if we have one. + def evaluate(scope) + if parentclass and ! scope.catalog.resource(:class, parentclass) + resource = parentobj.evaluate(scope) + end + + super + end + # Evaluate the code associated with this class. def evaluate_code(resource) scope = resource.scope @@ -58,11 +67,6 @@ class Puppet::Parser::AST::HostClass < Puppet::Parser::AST::Definition end end - def initialize(options) - @parentclass = nil - super - end - def parent_scope(scope, klass) if s = scope.compile.class_scope(klass) return s |