summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-07-10 16:25:10 +0000
committerFrancois Pons <fpons@mandriva.com>2002-07-10 16:25:10 +0000
commit1a649e4bd1f0a76ec28fcb851b2f8fe2d6d967e1 (patch)
tree73c2e8ca7870ef0bb99753a2b1cdf8b16eb7e211 /perl-install/install_steps_interactive.pm
parent52372f1853308aa90b76d4b5cd880c595433fc1d (diff)
downloaddrakx-1a649e4bd1f0a76ec28fcb851b2f8fe2d6d967e1.tar
drakx-1a649e4bd1f0a76ec28fcb851b2f8fe2d6d967e1.tar.gz
drakx-1a649e4bd1f0a76ec28fcb851b2f8fe2d6d967e1.tar.bz2
drakx-1a649e4bd1f0a76ec28fcb851b2f8fe2d6d967e1.tar.xz
drakx-1a649e4bd1f0a76ec28fcb851b2f8fe2d6d967e1.zip
use perl-URPM instead of rpmtools.
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm23
1 files changed, 11 insertions, 12 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index fec3d6502..e268f37f7 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -533,10 +533,9 @@ sub choosePackagesTree {
$o->ask_many_from_list('', _("Choose the packages you want to install"),
{
list => [ grep { !$limit_to_medium || pkgs::packageMedium($packages, $_) == $limit_to_medium }
- map { pkgs::packageByName($packages, $_) }
- keys %{$packages->{names}} ],
- value => \&pkgs::packageFlagSelected,
- label => \&pkgs::packageName,
+ @{$packages->{depslist}} ],
+ value => \&URPM::Package::flag_selected,
+ label => \&URPM::Package::name,
sort => 1,
});
}
@@ -766,13 +765,13 @@ sub installPackages {
my $old = \&pkgs::installCallback;
local *pkgs::installCallback = sub {
- my $m = shift;
- if ($m =~ /^Starting installation/) {
- $total = $_[1];
- } elsif ($m =~ /^Starting installing package/) {
- my $name = $_[0];
- $w->set(_("Installing package %s\n%d%%", $name, $total && 100 * $current / $total));
- $current += pkgs::packageSize(pkgs::packageByName($o->{packages}, $name));
+ my ($data, $type, $id, $subtype, $_amount, $_total) = @_;
+ if ($type eq 'user' && $subtype eq 'install') {
+ $total = $_amount;
+ } elsif ($type eq 'inst' && $subtype eq 'start') {
+ my $p = $data->{depslist}[$id];
+ $w->set(_("Installing package %s\n%d%%", $p->name, $total && 100 * $current / $total));
+ $current += $p->size;
} else { unshift @_, $m; goto $old }
};
@@ -991,7 +990,7 @@ sub summary {
my $format_printers = sub {
my $printer = $o->{printer};
if (is_empty_hash_ref($printer->{configured})) {
- pkgs::packageFlagInstalled(pkgs::packageByName($o->{packages}, 'cups')) and return _("Remote CUPS server");
+ pkgs::packageByName($o->{packages}, 'cups')->flag_installed and return _("Remote CUPS server");
return _("No printer");
}
my $entry;