-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add an apt_update resource #4422
Conversation
probably needs to have the apt-get-update-periodic stuff baked into it to be really useful... |
what is the intended use for this? currently resources like apt_repository uses something similar internally. |
@lamont-granquist yeah, although I wanted to throw something up to get the shape right. I think a fair amount of time the flow is going to be:
but I guess the other half is the @ranjib I think it sucks that you need the apt cookbook to do an |
i think the intended use is to kill off the apt cookbook dependency, so that cookbooks can just do something more like:
and then nobody has to sync down the apt cookbook, and rhel/windows/solaris users can stop bitching. we can also resolve the entirely silly situation where the apt cookbook is a hard dependency of practically every cookbook out there, but because we don't want to piss off the rhel users, we don't make it a hard dependency, which means that every cookbook is broken unless users know to manually add the apt repo (and requires the apt cookbook recipe being added in every kitchen.yml out there for testing on ubuntu). |
👎 in current form due to the excessive syncs it would run. We would need to port over the timestamp checking at a minimum. 👍 if we do that, though it only avoids the |
I think there's an (approved?) RFC to slurp up apt_repository into core chef as well? |
@chef/client-ubuntu this is ready for review... @lamont-granquist I don't think that ever got written. But we should. |
ah, it got a bunch of thumbs, but then deciderated that submissions into core chef didn't require an RFC for some reason rather than just being accepted... chef-boneyard/chef-rfc#101 |
👍 |
true | ||
else | ||
false | ||
end |
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.
could just return the conditional here.
also i thought there was more machinery involved in getting apt-get update to update the periodic stamp?
22cce0e
to
348d736
Compare
@chef/client-debian @chef/client-ubuntu this is really ready for review now, please. |
[STAMP_DIR, APT_CONF_DIR].each do |d| | ||
build_resource(:directory, d, caller[0]) do | ||
recursive true | ||
end.run_action(:create) |
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.
you don't have use_inline_resources here so you should still have to manually do the updated_by_last_action? dance.
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.
ah, i see, its always in a converge_by block and always sets the resources as being updated... nevermind, move along then....
👍 |
1 similar comment
👍 |
No description provided.