Ver código fonte

fix(apt): Fix the apt recipe

- Run 'apt-get dist-upgrade' to update system to the 'testing' debian

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO 2 anos atrás
pai
commit
9733d2fdee
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      cookbooks/workstation/recipes/_apt.rb

+ 6 - 0
cookbooks/workstation/recipes/_apt.rb

@@ -18,6 +18,7 @@ apt_repository 'debian_testing' do
   components components_
   deb_src true
   action :add
+  notifies :run, 'execute[UpdateDistribution]', :immediately
 end
 
 apt_repository 'debian_testing_updates' do
@@ -68,3 +69,8 @@ file '/etc/apt/apt.conf.d/01norecommend' do
   _EOF
 end
 
+execute 'UpdateDistribution' do
+  command '/usr/bin/apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"'
+  environment ({ 'DEBIAN_FRONTEND' => 'noninteractive' })
+  action :nothing
+end