From abcbe07ccae74f14ffd46c57bf754ebbe339be93 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 6 Jun 2009 18:59:00 +0000 Subject: [PATCH] Use yum list-sec if available to detect security updates --- software/yum-lib.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/software/yum-lib.pl b/software/yum-lib.pl index 77bf74313..ab94babc1 100644 --- a/software/yum-lib.pl +++ b/software/yum-lib.pl @@ -141,6 +141,21 @@ while() { } } close(PKG); + +# Also run list-sec to find out which are security updates +&open_execute_command(PKG, "yum list-sec", 1, 1); +while() { + s/\r|\n//g; + if (/^\S+\s+security\s+(\S+?)\-([0-9]\S+)\.([^\.]+)$/) { + local ($name, $ver) = ($1, $2); + if ($done{$name}) { + $done{$name}->{'source'} = 'security'; + $done{$name}->{'security'} = 1; + } + } + } +close(PKG); + return @rv; }