Issue #16314 has been reported by Patrick Hemmer.

----------------------------------------
Bug #16314: Evaluation of parameterized class deferred when class has duplicate 
bottom-level name
https://projects.puppetlabs.com/issues/16314

Author: Patrick Hemmer
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


This is the same as previous bug #4778, but occurs when the bottom-level name 
of a class is duplicated with another class.

Example:
<pre>
class foo {
        $variable="foo variable"
}
class bar::foo {
        class { "::foo":
        }
        notify { $::foo::variable: }
}
include bar::foo
</pre>

Results in:
<pre>
warning: Scope(Class[Bar::Foo]): Could not look up qualified variable 
'::foo::variable'; class ::foo has not been evaluated at /tmp/test.pp:7
warning: Scope(Class[Bar::Foo]): Could not look up qualified variable 
'::foo::variable'; class ::foo has not been evaluated at /tmp/test.pp:7
notice: undef
notice: /Stage[main]/Bar::Foo/Notify[undef]/message: defined 'message' as 
'undef'
notice: Finished catalog run in 0.11 seconds
</pre>


However if `foo::bar` is renamed to something else, such as `foo::bar2`, it 
works fine.

<hr />

An example use case where this issue is important is when using the puppet 
`dashboard` module.
I would like to create a `puppet::server::dashboard` class which provides the 
`settings.yml` file, and it needs to require 
`Package[$::dashboard::dashboard_package]`. But since I can't look up 
`$::dashboard::dashboard_package` I get the error `Could not find dependency 
Package[undef]`


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to