rodjek / librarian-puppet

http://librarian-puppet.com
MIT License
694 stars 216 forks source link

Installing modules fails on Windows (`Error: No such file or directory @ rb_sysopen`) #339

Closed Ajedi32 closed 8 years ago

Ajedi32 commented 8 years ago

While trying to use librarian-puppet to install a module on Windows, I got the following error:

$ librarian-puppet install
Error executing puppet module install. Check that this command succeeds:
puppet module install --version 4.12.0 --target-dir C:/Users/ajedi32/Workspace/projects/puppet-linuxmymodule/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.12.0 --module_repository https://forgeapi.puppetlabs.com --modulepath C:/Users/ajedi32/Workspace/projects/puppet-linuxmymodule/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.12.0 --module_working_dir C:/Users/ajedi32/Workspace/projects/puppet-linuxmymodule/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.12.0 --ignore-dependencies puppetlabs-stdlib
Error: No such file or directory @ rb_sysopen - C:/Users/ajedi32/Workspace/projects/puppet-linuxmymodule/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.12.0/cache/tmp20160613-1768-y11wqj/puppetlabs-stdlib-4.12.0/spec/unit/puppet/parser/functions/is_absolute_path_spec.rb
Error: Try 'puppet help module install' for usage

I believe this is occuring because of the maximum path length of 260 characters in the Windows API, as the path cited in the error message is 262 characters long.

Puppet "solved" this problem by using a shorter default temp directory path for puppet-install. See: https://tickets.puppetlabs.com/browse/PUP-4854 and puppetlabs/puppet#4090 Since librarian-puppet sets its own temp directory though that fix has no effect in this case.

Ajedi32 commented 8 years ago

Whoops, wrong repo. Moving to voxpupuli/librarian-puppet#17...