From b031143547a22a48475ef38c244f9ea30e45d7cd Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 3 Oct 2009 17:47:08 -0700 Subject: [PATCH] Get depedencies in one call --- package-updates/module.info | 1 + package-updates/package-updates-lib.pl | 5 +++-- package-updates/update.cgi | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-updates/module.info b/package-updates/module.info index d9cf8e058..2f82c9641 100644 --- a/package-updates/module.info +++ b/package-updates/module.info @@ -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 diff --git a/package-updates/package-updates-lib.pl b/package-updates/package-updates-lib.pl index dadbb1236..9dc51e6d4 100644 --- a/package-updates/package-updates-lib.pl +++ b/package-updates/package-updates-lib.pl @@ -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) = @_; diff --git a/package-updates/update.cgi b/package-updates/update.cgi index fe7df9a88..05080bce0 100755 --- a/package-updates/update.cgi +++ b/package-updates/update.cgi @@ -33,10 +33,12 @@ else { @ops = ( ); if (!$in{'confirm'}) { print $text{'update_ops'},"

\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) {