version 1.1, 2006/10/03 00:34:59
|
version 1.4, 2006/10/05 17:44:38
|
Line 181 sub check_with_up2date {
|
Line 181 sub check_with_up2date {
|
if (open (PIPE, "$up2date -l 2>&1 |")) { |
if (open (PIPE, "$up2date -l 2>&1 |")) { |
my @result=<PIPE>; |
my @result=<PIPE>; |
close(PIPE); |
close(PIPE); |
|
my $output; |
|
foreach my $line (@result) { |
|
if ($line =~ /^The following Packages were marked to be skipped by your configuration:/) { |
|
last; |
|
} else { |
|
$output .= $line; |
|
} |
|
} |
if (@result > 0) { |
if (@result > 0) { |
my $output = join('',@result); |
|
if ($output =~ /Fetching Obsoletes list/) { |
if ($output =~ /Fetching Obsoletes list/) { |
$up2date_error = 0; |
$up2date_error = 0; |
if ($output =~ /Name\s+Version\s+Rel\s+[\n\r\f]+\-+[\n\r\f]+(.+)/s) { |
if ($output =~ /Name\s+Version\s+Rel\s+[\n\r\f]+\-+[\n\r\f]+(.+)/s) { |
my $packagelist = $1; |
my $packagelist = $1; |
unless (($packagelist =~ /^The following Packages were marked to be skipped by your configuration:/) || ($packagelist eq '')) { |
if ($packagelist ne '' && $packagelist !~ /^[\s\n\r\f]+$/) { |
open(TMPFILE,">>$tmpfile"); |
open(TMPFILE,">>$tmpfile"); |
print TMPFILE $packagelist; |
print TMPFILE $packagelist; |
close(TMPFILE); |
close(TMPFILE); |
Line 218 sub check_with_rug {
|
Line 225 sub check_with_rug {
|
chomp(@output); |
chomp(@output); |
my @clean_output; |
my @clean_output; |
foreach my $line (@output) { |
foreach my $line (@output) { |
if ($line eq 'Waking up ZMD...' || $line eq 'Done') { |
if ($line =~ /^Waking\sup\sZMD\.\.\./) { |
next; |
next; |
} |
} elsif ($line eq 'Done') { |
if ($line eq 'No updates are available.') { |
next; |
|
} elsif ($line eq '') { |
|
next; |
|
} elsif ($line eq 'The following packages will be installed:') { |
|
next; |
|
} elsif ($line eq 'Resolving Dependencies...') { |
|
next; |
|
} elsif ($line eq 'Transaction...') { |
|
last; |
|
} elsif ($line eq 'No updates are available.') { |
last; |
last; |
} else { |
} else { |
push(@clean_output,$line); |
push(@clean_output,$line); |