Skip to content

Commit

Permalink
Only update the cache for the created repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Whiteley committed Jan 18, 2014
1 parent 5dad8fd commit f1fcc02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions providers/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@ def build_repo(uri, distribution, components, trusted, arch, add_deb_src)
action :nothing
end

execute 'apt-cache gencaches' do
ignore_failure true
action :nothing
end

execute 'apt-get update' do
command "apt-get update -o Dir::Etc::sourcelist='sources.list.d/#{new_resource.name}.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'"
ignore_failure true
action :nothing
notifies :run, 'execute[apt-cache gencaches]', :immediately
end

# build repo file
Expand Down

0 comments on commit f1fcc02

Please sign in to comment.