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

Actually enforce apt and yum versions in the metadata.rb file #874

Merged
merged 6 commits into from
Jul 3, 2023

Conversation

amenasria
Copy link
Contributor

@amenasria amenasria commented Dec 16, 2022

What does this PR do?

This PR enforces the apt and yum versions in the metadata.rb file.

Motivation

The apt and yum dependencies needed versions were explained in the metadata.rb file but just as comments:

depends    'apt' # Use '< 6.0.0' with Chef < 12.9
depends    'yum', '>= 3.0' # Use '< 5.0' with Chef < 12.14

This was also described in the README.md file.

This is not really user-friendly neither the best way of doing so since we can just add some logic in the metadata.rb file to deal with these cases.

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

@amenasria amenasria marked this pull request as ready for review December 16, 2022 16:02
@amenasria amenasria requested review from a team as code owners December 16, 2022 16:02
@amenasria amenasria requested a review from KSerrania December 16, 2022 16:27
metadata.rb Outdated

# Use '< 5.0' with Chef < 12.14
if Chef::VERSION < Gem::Version.new(12.14)
depends 'yum', '< 5.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this should be both >= 3.0 and < 5.0, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right ! Nice catch, fixed in 166fd1f.

@amenasria amenasria requested a review from bkabrda December 20, 2022 09:31
@chouetz chouetz merged commit 2343498 into main Jul 3, 2023
@chouetz chouetz deleted the amenasria/enforce-apt-and-yum-version branch July 3, 2023 13:44
This was referenced Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants