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

#33536 pkgrepo.managed does not disable a yum repo with "disabled: True" #35055

Merged
merged 1 commit into from Jul 29, 2016

Conversation

Projects
None yet
2 participants
@galet
Copy link

commented Jul 29, 2016

What does this PR do?

  • This fixes the pkgrepo state and yumpkg module for EL systems. The state was not working with enabled neither with disabled fields.
  • Fixes the situation when the "disabled" was saved into the repo file. Internally works with "disabled" but saves "enabled".
  • Fixes the warning message about enabled being deprecated.

What issues does this PR fix or reference?

#33536

Tests written?

No

Galet, Michal
#33536 pkgrepo.managed does not disable a yum repo with "disabled: True"
- This fixes the pkgrepo state and yumpkg module for EL systems. The state was not working with enabled neither with disabled fields.
- Fixes the situation when the "disabled" was saved into the repo file. Internally works with "disabled" but saves "enabled".

@cachedout cachedout merged commit 11ed147 into saltstack:2016.3 Jul 29, 2016

3 of 5 checks passed

default Pull Requests » Salt PR - Main Build #3786
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt Linode Ubuntu14.04 #3461 — FAILURE
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #3839 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #3753 — SUCCESS
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #3900 — SUCCESS
Details

rallytime added a commit to rallytime/salt that referenced this pull request Aug 26, 2016

Bump the deprecation warning in pkgrepo state to Nitrogen
Let's give users a little more time to update their states given
the issues found in saltstack#33536 that were fixed recently by saltstack#35055.

rallytime added a commit to rallytime/salt that referenced this pull request Aug 26, 2016

Bump the deprecation warning in pkgrepo state to Nitrogen
Let's give users a little more time to update their states given
the issues found in saltstack#33536 that were fixed recently by saltstack#35055.

rallytime added a commit that referenced this pull request Aug 26, 2016

Bump the deprecation warning in pkgrepo state to Nitrogen (#35806)
Let's give users a little more time to update their states given
the issues found in #33536 that were fixed recently by #35055.

rallytime added a commit that referenced this pull request Aug 26, 2016

Bump the deprecation warning in pkgrepo state to Nitrogen (#35810)
Let's give users a little more time to update their states given
the issues found in #33536 that were fixed recently by #35055.

terminalmage added a commit to terminalmage/salt that referenced this pull request Feb 8, 2017

Better handling of enabled/disabled arguments in pkgrepo.managed
This reverses the decision made in saltstack#35055 to deprecate the "enabled"
parameter in this state. This was a poorly-conceived decision, likely
made because the "enabled" param was not included in the docstring for
the pkgrepo.managed state under the "YUM/ZYPPER" section, while the
"disabled" param *was* listed under the "APT" section.

"disabled" isn't a thing in yum/dnf, so there was never any reason to
try to shoehorn it in. Not to mention the fact that the "disabled"
argument isn't even supported in Zypper, which effectively breaks Zypper
support.

This commit normalizes enabled/disabled based on platform, so passing
"enabled" in APT will pass the opposite value as "disabled", and
vice-versa on the other platforms. This allows enabled/disabled to be
used interchangeably.

It also more gracefully handles booleans in yum/dnf/zypper, so that a
bool can be properly compared to a 1/0 value.

rallytime added a commit that referenced this pull request Feb 8, 2017

Better handling of enabled/disabled arguments in pkgrepo.managed (#39251
)

This reverses the decision made in #35055 to deprecate the "enabled"
parameter in this state. This was a poorly-conceived decision, likely
made because the "enabled" param was not included in the docstring for
the pkgrepo.managed state under the "YUM/ZYPPER" section, while the
"disabled" param *was* listed under the "APT" section.

"disabled" isn't a thing in yum/dnf, so there was never any reason to
try to shoehorn it in. Not to mention the fact that the "disabled"
argument isn't even supported in Zypper, which effectively breaks Zypper
support.

This commit normalizes enabled/disabled based on platform, so passing
"enabled" in APT will pass the opposite value as "disabled", and
vice-versa on the other platforms. This allows enabled/disabled to be
used interchangeably.

It also more gracefully handles booleans in yum/dnf/zypper, so that a
bool can be properly compared to a 1/0 value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.