Zypper provider install options#2067
Zypper provider install options#2067darix wants to merge 2 commits intopuppetlabs:masterfrom darix:zypper-provider-install-options
Conversation
install_options => { '--from' => 'foobar' }
into a zypper call
zypper install "--from 'foobar'"
which doesnt work.
new code does
zypper install --from=foobar
|
Waiting for CLA signature by @darix @darix - We require a Contributor License Agreement (CLA) for people who contribute to Puppet, but we have an easy click-through license with instructions, which is available at https://cla.puppetlabs.com/ Note: if your contribution is trivial and you think it may be exempt from the CLA, please post a short reply to this comment with details. http://docs.puppetlabs.com/community/trivial_patch_exemption.html |
|
we signed the CLA as company now. |
|
@darix according to the zypper documentation SLES 11, the format of the option should be space-separated: Is this issue at hand actually the single quotes around the value? |
|
I actually use that code on sles. |
There was a problem hiding this comment.
If v has spaces in it, should that be quoted as a single argument? Is the important bit using the = to join the option and argument?
There was a problem hiding this comment.
Additionally, this fix is incorrect. We're sorting the keys here, so v is always nil.
There was a problem hiding this comment.
Also, we handle automatically applying quotes in lib/puppet/parameter/package_options.rb if a value has a space in it, so adding quotes will cause it to be double quoted.
|
@adrienthebo I believe the important bit is not providing literal quotes around the option+argument pair "--from REPO". Doing |
|
We talked about this briefly during the triage. We disbelieve those quotes are actually in effect. I tried to reproduce, but had a hard time getting master to run on a SLES12 box, unfortunately. We should probably be discussing this on Jira. |
|
I was able to reproduce on SLES 11: I've verified that this fix (when itself is fixed, since |
The old code would convert
install_options => { '--from' => 'foobar' }
into a zypper call
zypper install "--from 'foobar'"
which doesnt work.
new code does
zypper install --from=foobar