Issue #9461 has been updated by Matthaus Litteken.

Status changed from Merged - Pending Release to Closed

Released in 2.7.7rc1
----------------------------------------
Bug #9461: Puppet resource package fails on Windows
https://projects.puppetlabs.com/issues/9461

Author: Josh Cooper
Status: Closed
Priority: High
Assignee: Josh Cooper
Category: windows
Target version: 2.7.7
Affected Puppet version: development
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/158


On Windows the following fails:

<pre>
Z:\work\puppet>puppet resource package --trace
c:/ruby187/lib/ruby/gems/1.8/gems/win32-process-0.6.5/lib/win32/process.rb:889:in
 `create'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:275:in `execute_windows'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:313:in `execute'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/provider/package/gem.rb:29:in `gemlist'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/provider/package/gem.rb:65:in 
`instances'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/type.rb:876:in `instances'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/type.rb:869:in `collect'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/type.rb:869:in `instances'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/indirector/resource/ral.rb:14:in 
`search'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:249:in 
`search'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application/resource.rb:189:in `main'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:314:in `run_command'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in `exit_on_fail'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
c:/ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
c:/ruby187/bin/puppet:4
Could not run: CreateProcess() failed:
</pre>

The gem package provider is trying to execute 'c:\ruby187\bin/gem list 
--local', but this fails because 'gem' is a ruby script, and on Windows we need 
to execute the gem.bat wrapper in the same directory. This is also an issue 
with one of the spec tests (it tries to run git, when it needs to run git.bat).

Fixing this will likely involve making the Puppet::Util.execute method smarter 
when running on Windows, and taking into consideration the PATHEXT environment 
variable when a file extension is not provided.


-- 
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