mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Fix to check for referenced package only when allowed
This commit is contained in:
@@ -44,7 +44,7 @@ foreach my $m (@mods) {
|
||||
if (!$pkg) {
|
||||
# Package is referenced by another name
|
||||
foreach (@poss) {
|
||||
my @pinfo = &software::package_info($_);
|
||||
my @pinfo = &software::package_info($_, undef, 1);
|
||||
$pkg = { 'name' => $pinfo[0],
|
||||
'version' => $pinfo[4] } if @pinfo;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ return 0 if ($?); # couldn't find the package
|
||||
return $i;
|
||||
}
|
||||
|
||||
# package_info(package, [version])
|
||||
# package_info(package, [version], [check-referenced])
|
||||
# Returns an array of package information in the order
|
||||
# name, class, description, arch, version, vendor, installtime
|
||||
sub package_info
|
||||
@@ -53,6 +53,7 @@ chop(@tmp);
|
||||
local $ex = close(RPM);
|
||||
local $whatprovides = "";
|
||||
if (!@tmp || $tmp[0] =~ /not\s+installed/) {
|
||||
return () if (!$_[2]);
|
||||
&open_execute_command(RPM, "rpm -q --whatprovides $n --queryformat \"%{NAME}\\n%{GROUP}\\n%{ARCH}\\n%{VERSION}-%{RELEASE}\\n%{VENDOR}\\n%{INSTALLTIME}\\n\" 2>/dev/null", 1, 1);
|
||||
@tmp = <RPM>;
|
||||
chop(@tmp);
|
||||
|
||||
Reference in New Issue
Block a user