From: Tom Hughes Date: Wed, 11 Feb 2015 00:44:52 +0000 (+0000) Subject: Only run apt-update when a new source is added X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/b6672a3c74491a56333974303e1cbd7deb9ddb7c?ds=sidebyside Only run apt-update when a new source is added --- diff --git a/cookbooks/apt/resources/source.rb b/cookbooks/apt/resources/source.rb index 2839b29b6..8669857c7 100644 --- a/cookbooks/apt/resources/source.rb +++ b/cookbooks/apt/resources/source.rb @@ -32,5 +32,5 @@ def initialize(name, run_context = nil) end def after_created - notifies :run, "execute[apt-update]", :immediately + notifies :run, "execute[apt-update]", :immediately if @action == :create end