Skip to content

Commit

Permalink
Switch to dist-upgrade
Browse files Browse the repository at this point in the history
The `upgrade` action only reports updated packages that have no changed
dependencies.  You must use `dist-upgrade` to see such upgrades.
  • Loading branch information
smortex committed Nov 1, 2016
1 parent eff71a6 commit bc966be
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/facter/apt_updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Facter.add("apt_has_updates") do
confine :osfamily => 'Debian'
if File.executable?("/usr/bin/apt-get")
apt_get_result = Facter::Util::Resolution.exec('/usr/bin/apt-get -s upgrade 2>&1')
apt_get_result = Facter::Util::Resolution.exec('/usr/bin/apt-get -s dist-upgrade 2>&1')
if not apt_get_result.nil?
apt_package_updates = [[], []]
apt_get_result.each_line do |line|
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/apt_has_updates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
File.stubs(:executable?) # Stub all other calls
Facter::Util::Resolution.stubs(:exec) # Catch all other calls
File.expects(:executable?).with('/usr/bin/apt-get').returns true
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s dist-upgrade 2>&1').returns ""+
"Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/apt_package_updates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
File.stubs(:executable?) # Stub all other calls
Facter::Util::Resolution.stubs(:exec) # Catch all other calls
File.expects(:executable?).with('/usr/bin/apt-get').returns true
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s dist-upgrade 2>&1').returns ""+
"Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/apt_security_updates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
File.stubs(:executable?) # Stub all other calls
Facter::Util::Resolution.stubs(:exec) # Catch all other calls
File.expects(:executable?).with('/usr/bin/apt-get').returns true
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s dist-upgrade 2>&1').returns ""+
"Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/apt_updates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
File.stubs(:executable?) # Stub all other calls
Facter::Util::Resolution.stubs(:exec) # Catch all other calls
File.expects(:executable?).with('/usr/bin/apt-get').returns true
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s dist-upgrade 2>&1').returns ""+
"Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
"Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
Expand Down

0 comments on commit bc966be

Please sign in to comment.