diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-14 22:50:28 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-14 22:50:28 +0000 |
commit | 29ded0199011a34547dd7acc231f662757e681d1 (patch) | |
tree | 8f0b8eb0c1db1afd8b15ef8f50648025adf3b7fd /lib | |
parent | 72f8b3205296e1242ff63061fb7a6770cd423609 (diff) | |
download | puppet-29ded0199011a34547dd7acc231f662757e681d1.tar.gz puppet-29ded0199011a34547dd7acc231f662757e681d1.tar.xz puppet-29ded0199011a34547dd7acc231f662757e681d1.zip |
Fixing painfully difficult to find bug in defining exported resources
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1922 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parser/ast/resourcedef.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/puppet/parser/ast/resourcedef.rb b/lib/puppet/parser/ast/resourcedef.rb index 1c9333030..dfd7c447e 100644 --- a/lib/puppet/parser/ast/resourcedef.rb +++ b/lib/puppet/parser/ast/resourcedef.rb @@ -90,14 +90,21 @@ class ResourceDef < AST::Branch # many times. objtitles.collect { |objtitle| exceptwrap :type => Puppet::ParseError do + exp = self.exported || scope.exported + # We want virtual to be true if exported is true. We can't + # just set :virtual => self.virtual in the initialization, + # because sometimes the :virtual attribute is set *after* + # :exported, in which case it clobbers :exported if :exported + # is true. Argh, this was a very tough one to track down. + virt = self.virtual || exported obj = Puppet::Parser::Resource.new( :type => objtype, :title => objtitle, :params => paramobjects, :file => @file, :line => @line, - :exported => self.exported || scope.exported, - :virtual => self.virtual, + :exported => exp, + :virtual => virt, :source => scope.source, :scope => scope ) |