(#9461) 'puppet resource package' fails on Windows #128
Closed
ChaseMotorman wants to merge 2 commits intopuppetlabs:2.7.xfrom
ChaseMotorman:ticket/2.7.x/9491-windows-package-failure
Closed
(#9461) 'puppet resource package' fails on Windows #128ChaseMotorman wants to merge 2 commits intopuppetlabs:2.7.xfrom ChaseMotorman:ticket/2.7.x/9491-windows-package-failure
ChaseMotorman wants to merge 2 commits intopuppetlabs:2.7.xfrom
ChaseMotorman:ticket/2.7.x/9491-windows-package-failure
Conversation
added 2 commits
September 20, 2011 15:42
This commit corrects a basic failure to enumerate package resources on Windows. In previous versions, 'package' enumeration failed due to the provider subsystem's inability to exec any process neccesary to do the enumerations. The general fix expands the Puppet::Util.which command when running on Windows to search for EXE variants if the target is not found. For example, a search for 'gem' fails, because 'gem' (like all other Ruby and Puppet binaries) is wrapped in a batch file, creating 'gem.bat'. If a lookup fails on Windows, and the passed value doesn't contain a file extension, 'which' will examine the value of the environment 'PATHEXT' setting, which contains a delimited list of known extensions. 'which' will append each extension to the value (in order of appearance) and reevaluate. If no PATHEXT value exists, the code defaiults to the basic Windows binary extensions (.bat;.ps1;.exe;.com). The first match found wins, and the translated value is cached against future lookups. Spec tests have been updated to reflect this change.
The second, specific change corrects resource enumeration in the Windows MSI provider. Installed MSI package state files were not examined for the required 'source' value. This commit now examines the YAML state file, caches the yaml object, and adds a get-method to return the 'source' value. The 'package' type base class was also fixed to only validate source properties for providers that extend the 'source' method. Spec tests have been updated to reflect new and fixed code. Depends on resolution #9461:puppet resource package' fails on Windows
Contributor
|
Superceded by #158 |
melissa
pushed a commit
to melissa/puppet
that referenced
this pull request
Mar 30, 2018
(maint) Remove facter include / lib dependency from CMakeLists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit corrects a basic failure to enumerate package resources
on Windows. In previous versions, 'package' enumeration failed due to
the provider subsystem's inability to exec any process neccesary to
do the enumerations.
The general fix expands the Puppet::Util.which command when running
on Windows to search for EXE variants if the target is not found.
For example, a search for 'gem' fails, because 'gem' (like all other
Ruby and Puppet binaries) is wrapped in a batch file, creating 'gem.bat'.
If a lookup fails on Windows, and the passed value doesn't contain a file
extension, 'which' will examine the value of the environment 'PATHEXT'
setting, which contains a delimited list of known extensions. 'which'
will append each extension to the value (in order of appearance) and
reevaluate. If no PATHEXT value exists, the code defaiults to the
basic Windows binary extensions (.bat;.ps1;.exe;.com). The first match
found wins, and the translated value is cached against future lookups.
Spec tests have been updated to reflect this change.
(#9607) MSI provider fails to enumerate instances
The second, specific change corrects resource enumeration in the Windows
MSI provider. Installed MSI package state files were not examined for
the required 'source' value. This commit now examines the YAML state
file, caches the yaml object, and adds a get-method to return the
'source' value. The 'package' type base class was also fixed to only
validate source properties for providers that extend the 'source' method.
Spec tests have been updated to reflect new and fixed code.
Depends on resolution #9461:puppet resource package' fails on Windows