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

execute 'apt-get update' block removed in 2.4.x #84

Closed
jwmarshall opened this issue Aug 13, 2014 · 5 comments
Closed

execute 'apt-get update' block removed in 2.4.x #84

jwmarshall opened this issue Aug 13, 2014 · 5 comments

Comments

@jwmarshall
Copy link

The removal of the following block (last appeared in 2.3.10) has broken several cookbooks that rely on hooking this event in their recipes. I found out the hard way after installing a newer cookbook that depends on apt. I was able to fix the issue by pinning to 2.3.x in my environment, but its worth mentioning since many cookbook developers do not pin the cookbook versions in their metadata.

What was the reason for the removal?

# For other recipes to call to force an update
execute 'apt-get update' do
  command 'apt-get update'
  ignore_failure true
  only_if { apt_installed? }
  action :nothing
end
@tmatilai
Copy link
Contributor

It seemed to be done in #77. It was actually released in v2.5.0. The earlier v2.4.0 should still be working fine.

The "debian" cookbook was also affected (reaktor/chef-debian#15). I just released a new version which pins down the dependency. The earlier requirement was indeed too optimistic, but even ~> 2.4 would not have been enough as this was not released as a major version.

@fnichol
Copy link
Contributor

fnichol commented Aug 13, 2014

Confirmed here as well with version 2.5.0 (version 2.4.0 does work as usual).

I'm going to throw a crazy theory out there and guess that because the remaining execute[apt-get update] resource is assigned to a variable, it doesn't actually land in the resource collection (or at least not in the first phase).

If I have a chance I'll circle back to confirm or disprove this guess, but in the meantime I've pinned back to ~> 2.4.0 and continued on for the day 😄

@kisoku
Copy link
Contributor

kisoku commented Aug 14, 2014

Hey guys could you take my PR for a test drive and see if it improves the situation ?

@tmatilai
Copy link
Contributor

This should be fixed in v2.5.2.

@kisoku
Copy link
Contributor

kisoku commented Aug 22, 2014

As tmailai said, this was fixed in 2.5.2. Closing this issue

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

No branches or pull requests

4 participants