opscode-cookbooks/apt — pull request #10 by gilles (2012-07-27 17:29:24+00:00)
Title: COOK-1500

Avoid triggering apt-get update

This allows:

```ruby
#run apt-get update after the 2 repos are added. Not each time.
r = apt_repository 'A' do
uri 'http://A'
deb_src true
apt_update false
action :nothing
end
r.run_action(:add)
updated = r.updated?

r = apt_repository 'B' do
uri 'http://B'
apt_update false
action :nothing
end
r.run_action(:add)
updated ||= r.updated?

if updated
resources(:execute => 'apt-get update').run_action(:run)
end
```