Skip to content

Commit

Permalink
[COOK-4102] - Only index created repository
Browse files Browse the repository at this point in the history
Signed-off-by: Sean OMeara <someara@opscode.com>
  • Loading branch information
Matt Whiteley authored and Sean OMeara committed Jan 30, 2014
1 parent 0a5e783 commit e223b7c
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
@@ -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

0 comments on commit e223b7c

Please sign in to comment.