mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Better handle case where some requested packages don't exist
This commit is contained in:
@@ -14,7 +14,9 @@ local($i, $list); $i = 0;
|
||||
$list = @_ ? join(' ', map { quotemeta($_) } @_) : "-a";
|
||||
%packages = ( );
|
||||
&open_execute_command(RPM, "rpm -q $list --queryformat \"%{NAME}\\n%{VERSION}-%{RELEASE}\\n%{EPOCH}\\n%{GROUP}\\n%{ARCH}\\n%{SUMMARY}\\n\\n\"", 1, 1);
|
||||
while($packages{$i,'name'} = <RPM>) {
|
||||
while(my $name = <RPM>) {
|
||||
next if ($name =~ /is\s+not\s+installed$/);
|
||||
$packages{$i,'name'} = $name;
|
||||
chop($packages{$i,'name'});
|
||||
chop($packages{$i,'version'} = <RPM>);
|
||||
chop($packages{$i,'epoch'} = <RPM>);
|
||||
|
||||
Reference in New Issue
Block a user