Skip to content

Commit

Permalink
Include backports recipe always on backports_sloppy
Browse files Browse the repository at this point in the history
The docs were correct, we should really also include the normal
backports repository when using backports_sloppy.
  • Loading branch information
Teemu Matilainen committed Jul 14, 2015
1 parent d564922 commit 4791277
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ Improvements:

- Fix compatibility with apt cookbook 2.7.0 and newer using `glob` for `apt_preference`. Requires apt cookbook 1.9.0 or later. ([GH-16][])

Bug fixes:

- `backports_sloppy` should always include the `backports` recipe. ([GH-19][])

# 1.7.2 / 2014-08-22

Improvements:
Expand Down Expand Up @@ -135,3 +139,4 @@ Features:
[GH-16]: https://github.com/reaktor/chef-debian/issues/16 "Issue 16"
[GH-17]: https://github.com/reaktor/chef-debian/issues/17 "Issue 17"
[GH-18]: https://github.com/reaktor/chef-debian/issues/18 "Issue 18"
[GH-19]: https://github.com/reaktor/chef-debian/issues/19 "Issue 19"
3 changes: 2 additions & 1 deletion recipes/backports_sloppy.rb
Expand Up @@ -23,10 +23,11 @@
Chef::Log.warn "#{node['debian']['codename']}-backports-sloppy does not exist yet"
Chef::Log.warn "Please file an issue if I'm wrong: https://github.com/reaktor/chef-debian/issues"
Chef::Log.info 'Including `debian::backports` recipe instead'
include_recipe 'debian::backports'
else
debian_repository 'backports-sloppy' do
uri Chef::Debian::Helpers.backports_mirror(node)
distribution "#{node['debian']['codename']}-backports-sloppy"
end
end

include_recipe 'debian::backports'
6 changes: 6 additions & 0 deletions spec/recipes/backborts_sloppy_spec.rb
Expand Up @@ -8,6 +8,9 @@
end.converge('debian::backports_sloppy')
end

it 'includes debian::backports recipe' do
expect(chef_run).to include_recipe('debian::backports')
end
it 'configures debian-backports-sloppy repository' do
expect(chef_run).to add_apt_source(
'deb http://example.com/debian-backports squeeze-backports-sloppy main contrib non-free',
Expand All @@ -20,6 +23,9 @@
debian_runner('7.0').converge('debian::backports_sloppy')
end

it 'includes debian::backports recipe' do
expect(chef_run).to include_recipe('debian::backports')
end
it 'configures debian-backports-sloppy repository' do
expect(chef_run).to add_apt_source(
'deb http://httpredir.debian.org/debian wheezy-backports-sloppy main contrib non-free',
Expand Down

0 comments on commit 4791277

Please sign in to comment.