diff --git a/providers/repository.rb b/providers/repository.rb index 27b7dfcd..a4810507 100644 --- a/providers/repository.rb +++ b/providers/repository.rb @@ -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