Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
(CONT-773) Rubocop Auto Fixes 1-5
[puppet-modules/puppetlabs-apt.git]
/
lib
/
facter
/
apt_updates.rb
diff --git
a/lib/facter/apt_updates.rb
b/lib/facter/apt_updates.rb
index e3b17d957e0a85a24f4f4782acf130de55a5d196..3b46e2d63d696adc243bab33e895bec673b901be 100644
(file)
--- a/
lib/facter/apt_updates.rb
+++ b/
lib/facter/apt_updates.rb
@@
-9,11
+9,12
@@
apt_dist_updates = nil
def get_updates(upgrade_option)
apt_updates = nil
if File.executable?('/usr/bin/apt-get')
def get_updates(upgrade_option)
apt_updates = nil
if File.executable?('/usr/bin/apt-get')
- apt_get_result = Facter::
Util::Resolution.exec
("/usr/bin/apt-get -s -o Debug::NoLocking=true #{upgrade_option} 2>&1")
+ apt_get_result = Facter::
Core::Execution.execute
("/usr/bin/apt-get -s -o Debug::NoLocking=true #{upgrade_option} 2>&1")
unless apt_get_result.nil?
apt_updates = [[], []]
apt_get_result.each_line do |line|
next unless %r{^Inst\s}.match?(line)
unless apt_get_result.nil?
apt_updates = [[], []]
apt_get_result.each_line do |line|
next unless %r{^Inst\s}.match?(line)
+
package = line.gsub(%r{^Inst\s([^\s]+)\s.*}, '\1').strip
apt_updates[0].push(package)
security_matches = [
package = line.gsub(%r{^Inst\s([^\s]+)\s.*}, '\1').strip
apt_updates[0].push(package)
security_matches = [