Get depedencies in one call

This commit is contained in:
Jamie Cameron
2009-10-03 17:47:08 -07:00
parent f625d505f3
commit b031143547
3 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
desc=Software Package Updates
longdesc=Displays available package updates from YUM, APT or other update systems
category=system
depends=software cron mailboxes 1.420
os_support=redhat-linux debian-linux mandrake-linux/10.2-* solaris

View File

@ -409,8 +409,9 @@ unlink($current_all_cache_file);
return @rv;
}
# list_package_operations(package, system)
# Given a package, returns a list of all dependencies that will be installed
# list_package_operations(package|packages, system)
# Given a package (or space-separate package list), returns a list of all
# dependencies that will be installed
sub list_package_operations
{
my ($name, $system) = @_;

View File

@ -33,10 +33,12 @@ else {
@ops = ( );
if (!$in{'confirm'}) {
print $text{'update_ops'},"<p>\n";
@pkgnames = ( );
foreach my $ps (@pkgs) {
($p, $s) = split(/\//, $ps);
push(@ops, &list_package_operations($p, $s));
push(@pkgnames, $p);
}
@ops = &list_package_operations(join(" ", @pkgnames), $s);
}
if (@ops) {