Skip to content

Commit

Permalink
COOK-533 - add support for deb and deb_src repos with apt_repository …
Browse files Browse the repository at this point in the history
…provider
  • Loading branch information
apsoto authored and jtimberman committed Dec 15, 2011
1 parent faabaa7 commit c53ac9e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions providers/repository.rb
Expand Up @@ -39,12 +39,9 @@
end.run_action(:run)
end
# build our listing
repository = "deb"
repository = "deb-src" if new_resource.deb_src
repository = "# Created by the Chef apt_repository LWRP\n" + repository
repository += " #{new_resource.uri}"
repository += " #{new_resource.distribution}"
new_resource.components.each {|component| repository += " #{component}"}
repo_info = "#{new_resource.uri} #{new_resource.distribution} #{new_resource.components.join(" ")}"
repository = "deb #{repo_info}\n"
repository += "deb-src #{repo_info}\n" if new_resource.deb_src
# write out the file, replace it if it already exists
file "/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list" do
owner "root"
Expand Down

0 comments on commit c53ac9e

Please sign in to comment.