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

Expose notify_update to apt::conf #551

Merged
merged 1 commit into from
Aug 17, 2015

Conversation

bdellegrazie
Copy link

Created ticket: https://tickets.puppetlabs.com/browse/MODULES-2269

This pull request simply exposes notify_update parameter of underlying apt::setting defined type to the apt::conf defined type as it isn't always appropriate to trigger an update for a specific configuration file.

I don't believe apt::pin shouldn't trigger an update either (set notify_update to false) - however willing to rework this if people disagree and simply expose notify_update as for apt::conf.

Happy to discuss further.
Thanks

@daenney
Copy link

daenney commented Jul 23, 2015

Pins indeed don't need to trigger an apt-get update, they take effect at the next apt call that tries to determine which version of a package should be installed.

@bdellegrazie
Copy link
Author

Hi @daenney, is there anything else I need to do to get this merged?
Thanks!

@daenney
Copy link

daenney commented Aug 5, 2015

Oh, yes, sorry. It's currently lacking tests for the behaviour you've changed so though the original examples still work we're not validating the new possible uses.

We also need the documentation around the defined types updated with the new parameter and how it can be used.

@bdellegrazie
Copy link
Author

Hi @daenney, I've added documentation and rspec test for apt::conf, I hope its sufficient - this is my first attempt at rspec-puppet tests.
With respect to the apt::pin change I'm not sure if any form of test is worthwhile here as before it unnecessarily triggered an apt-get update, now it will not. However I have documented this behaviour. Please let me know if there is anything else necessary.
Thanks

@bdellegrazie
Copy link
Author

Hi @daenney is there anything else necessary to get this merged?
Thanks

@daenney
Copy link

daenney commented Aug 16, 2015

Yes, I would really appreciate a squash here. It's a single feature and as such I'd like to merge it as a single commit into history.

* Expose the underlying notify_update setting of the apt::settings resource
This is because not all configuration file changes should trigger an apt::update notification
* apt::pin also shouldn't result in an apt-update call
Adding a pin configuration should apply to the next apt-get update call it shouldn't trigger one itself.
* Added documentation
* Add tests for apt::conf notify_update
@bdellegrazie
Copy link
Author

Hi @daenney squashed as requested, rebased to current master as well.

@daenney
Copy link

daenney commented Aug 17, 2015

@mhaskel Good to go?

underscorgan pushed a commit that referenced this pull request Aug 17, 2015
Expose notify_update to apt::conf
@underscorgan underscorgan merged commit 3df188f into puppetlabs:master Aug 17, 2015
@underscorgan
Copy link

@bdellegrazie thanks for the contribution!

@bdellegrazie bdellegrazie deleted the MODULES-2269 branch August 18, 2015 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants