opscode/cookbooks — pull request #406 by gilles (2012-06-20 18:08:15+00:00)
Title: COOK-1381 better apt-get update managment

Allows things like this:

```
#add them during evaluation and 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
```