-
Notifications
You must be signed in to change notification settings - Fork 466
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
Only call apt-get update once per puppet run #13
Conversation
Closes #11966
@rodjek - the code for this looks good at first glance. Could you add some rspec-puppet tests? |
the code for this looks good at first glance. Could you add some rspec-puppet tests? |
Yep, I'll add them now. Wasn't sure if you were testing with rspec-puppet for this module as the existing tests are kind of sparse. |
@rodjek Just to let you know. We just got those spec tests merged |
@rodjek update on this pull request. Having a single apt-update is actually problematic. The problem is that you may have to run an apt-update both before you install python-software properties and after (if you use apt-repository-add) |
Isn't it worth the trouble anyway? I mean, having to do an apt-update before installing python-software-properties is kind of an edge-case, right? Compare that with saving a half-dozen apt-update; wouldn't the 80/20 rule apply here? Also, this is orthogonal to this review, but:
|
exec { "apt-builddep-${name}": | ||
command => "/usr/bin/apt-get -y --force-yes build-dep $name", | ||
notify => Exec["apt-update-${name}"], | ||
notify => Exec["apt update"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't Apt::Update declare a dependency on this Exec["apt update"] so that this line (and all other similar ones) read notify => Class["Apt::Update"]
instead?
This no longer merges cleanly. Reimplemented in #49 |
Change things around so that there's a single Exec[apt update] resource that just gets notified as needed.
https://projects.puppetlabs.com/issues/11966