HomePhorge

(#13349) Fix incorrect scope behavior
234f306a00b5Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#13349) Fix incorrect scope behavior

This commit resolves an error with class inclusion, via a resource
rather than the include statement, where if the class was a top-level
class, the class name would get resolved twice: once for adding the
resource (which happened correctly) and again when evaluating the class
(which would incorrectly re-check all the namespaces though with the ::
stripped off) finding the nested version.

Prior to this commit the following manifest would generate both notify
messages. After this commit, the manifest only generates the top-level
notify messages.

class { 'foo::test': }
class foo::test {
class { '::bar::baz': }
}
class bar::baz {
notify { 'good!': }
}
class foo::bar::baz {
notify { 'bad!': }
}

Details

Provenance
Jeff Weiss <jeff.weiss@puppetlabs.com>Authored on
Daniel Pittman <daniel@puppetlabs.com>Committed on Apr 29 2012, 4:48 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU48a768a2e33c: (#13966) Remove remaining uses of :name setting
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU234f306a00b5: (#13349) Fix incorrect scope behavior (authored by Jeff Weiss <jeff.weiss@puppetlabs.com>).Apr 29 2012, 4:48 AM