apt: Drop preferences (pinning) for backports

This commit is contained in:
David Prevot 2023-10-26 16:42:34 +02:00
parent 953ca015c5
commit 6fb3eefde9
9 changed files with 2 additions and 45 deletions

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=bookworm-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=bullseye-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=buster-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=jessie-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=stretch-backports
Pin-Priority: 50

View file

@ -10,19 +10,9 @@
tags:
- apt
- name: Backports configuration
ansible.builtin.copy:
src: '{{ ansible_distribution_release }}_backports_preferences'
dest: /etc/apt/preferences.d/0-backports-defaults
force: true
mode: "0640"
register: apt_backports_config
tags:
- apt
- name: Apt update
ansible.builtin.apt:
update_cache: yes
when: apt_backports_sources is changed or apt_backports_config is changed
when: apt_backports_sources is changed
tags:
- apt

View file

@ -17,16 +17,6 @@
tags:
- apt
- name: Backports configuration
ansible.builtin.copy:
src: '{{ ansible_distribution_release }}_backports_preferences'
dest: /etc/apt/preferences.d/0-backports-defaults
force: true
mode: "0640"
register: apt_backports_config
tags:
- apt
- name: Archived backport are accepted (jessie)
ansible.builtin.lineinfile:
dest: '/etc/apt/apt.conf.d/99no-check-valid-until'
@ -42,4 +32,4 @@
update_cache: yes
tags:
- apt
when: apt_backports_list is changed or apt_backports_config is changed
when: apt_backports_list is changed

View file

@ -8,10 +8,6 @@ describe file("/etc/apt/sources.list.d/backports.list") do
it { should be_file }
end
describe file("/etc/apt/preferences.d/0-backports-defaults") do
it { should be_file }
end
describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
its(:stdout) { should_not be_empty }
its(:exit_status) { should eq 0 }

View file

@ -8,10 +8,6 @@ set :backend, :exec
# it { should be_file }
# end
#
# describe file("/etc/apt/preferences.d/0-backports-defaults") do
# it { should be_file }
# end
#
# describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
# its(:stdout) { should_not be_empty }
# its(:exit_status) { should eq 0 }