(PUP-3935) Fix pluginsync errors when dealing with symlinks
Currently, Puppet produces one of two pluginsync errors during an
agent run if the root of a modulepath directory is a symlink
and no modules contain a facts.d or lib directory.
In the normal case, when the base module path is a directory
and none if its modules include facts.d or lib directories,
pluginsync returns the path to the module path directory itself,
at which point the file type disables recursion in its
recurse_remote method and stops the agent from attempting to
download plugins.
However, if the base module path is not a directory (in this case
a link), recurse_remote returns early, causing the agent-side
facts.d or lib directory to not have its 'source' metadata set,
leading to a failing query back to the master.
This commit forces pluginsync to follow symlinks rather than
manage them. To do this, the :links attribute is set to :follow
in the #default_arguments method of the
Puppet::Configurer::Downloader class, which is only used
for pluginsync. Doing this ensures that what pluginsync
returns will be a directory rather than a link, allowing the
resource to have its source metadata correctly set.
Paired with Peter Huene <peter.huene@puppetlabs.com>