HomePhorge

(PUP-3336) Be consistent about a single libdir
2139618113c7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3336) Be consistent about a single libdir

Previously, it was possible to set Puppet[:libdir] to a list of
directories, so that the autoloader's search path could be expanded.
That behavior was added in f9e05a806.

That said, it only worked when using puppet as a library, most commonly
when executing tests for modules that depend on each other. If you ever
tried to actually run puppet with :libdir containing multiple
directories, puppet would try to manage/create the directory,
interpreting it as a single directory, and would fail with:

$ puppet apply -e "notice 'hi'" --libdir /tmp/a:/tmp/b
Cannot create /tmp/a:/tmp/b; parent directory /tmp/a:/tmp does not exist

This commit modifies the autoloader so that it no longer splits the
:libdir setting, consistent with other parts of puppet that assume
it's a single directory, e.g. the :libdir hook that updates $LOAD_PATH
and loading augeas lenses.

To accomplish the behavior that existed previously, it is better to
update the ruby $LOAD_PATH to include whatever additional directories
are necessary. This way the autoloader can load module specific code as
well as helper code within the module, or in different modules.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU18edec0dc581: Merge pull request #3033 from i-maravic/upstart-status-fix
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU2139618113c7: (PUP-3336) Be consistent about a single libdir (authored by Josh Cooper <josh@puppetlabs.com>).Dec 3 2014, 6:20 AM