Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs in handling 'source' in msu_package and cab_package #6686

Merged
merged 2 commits into from Dec 18, 2017

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Dec 16, 2017

The two issues fixed here:

  1. cab_package did not require source, but didn't set it from the resource name so cab_package 'xyz.cab' would just fail since source was nil
  2. msu_package would coerce the resource name and not package_name so if you overwrote the package name you would also have to set the source, although you wouldn't realize that until it failed oddly

So the solution here is to set the source value to package_name by default and that gets coerced into a path as was previously done. This adds tests for this behavior and the coerce behavior itself to both resources.

This fixes issue #6674

Signed-off-by: Tim Smith tsmith@chef.io

The two issues fixed here:

1) cab_package did not require source, but didn't set it from the resource name so cab_package 'xyz.cab' would just fail since source was nil
2) msu_package would coerce the resource name and not package_name so if you overwrote the package name you would also have to set the source, although you wouldn't realize that until it failed oddly

So the solution here is to set the source value to package_name by default and that gets coerced into a path as was previously done. This adds tests for this behavior and the coerce behavior itself to both resources.

This fixes issue #6674

Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 requested a review from a team December 16, 2017 02:02
The path helper does exactly what we expect it to and that makes this only work on *nix

Signed-off-by: Tim Smith <tsmith@chef.io>
@thommay thommay merged commit 5660d0e into master Dec 18, 2017
@tas50 tas50 deleted the msu_and_cab_defaults branch December 19, 2017 22:10
@lock
Copy link

lock bot commented Jan 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants