From: Morgan Haskel Date: Mon, 11 Aug 2014 19:56:32 +0000 (-0400) Subject: Sometimes killing apt is too aggressive. X-Git-Tag: 1.6.0~2^2~3 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=08043adb753210c12cbd704ea800898a17751ff6;p=puppet-modules%2Fpuppetlabs-apt.git Sometimes killing apt is too aggressive. --- diff --git a/spec/acceptance/unattended_upgrade_spec.rb b/spec/acceptance/unattended_upgrade_spec.rb index 09f4e2b..02ebea4 100644 --- a/spec/acceptance/unattended_upgrade_spec.rb +++ b/spec/acceptance/unattended_upgrade_spec.rb @@ -8,10 +8,14 @@ describe 'apt::unattended_upgrades class', :unless => UNSUPPORTED_PLATFORMS.incl include apt::unattended_upgrades EOS - # Attempted workaround for problems seen on debian with - # something holding the package database open. - shell('killall -9 apt-get', { :acceptable_exit_codes => [0,1] }) - shell('killall -9 dpkg', { :acceptable_exit_codes => [0,1] }) + if fact('operatingsystem') == 'Debian' + # Attempted workaround for problems seen on debian with + # something holding the package database open. + shell('killall -9 apt-get', { :acceptable_exit_codes => [0,1] }) + shell('killall -9 dpkg', { :acceptable_exit_codes => [0,1] }) + shell('dpkg --configure -a') + end + apply_manifest(pp, :catch_failures => true) end