diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-28 08:13:25 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-28 08:13:25 +0000 |
commit | 25b509fb3abe00f143be1cf32003bb7f6dbe8213 (patch) | |
tree | d3980fe6e4ac895744fe52cd0df515fdd073e96a | |
parent | 5a4daf6c34acf5c5ea56f5f66d9bbb1fa92fbd4a (diff) | |
download | rpmdrake-25b509fb3abe00f143be1cf32003bb7f6dbe8213.tar rpmdrake-25b509fb3abe00f143be1cf32003bb7f6dbe8213.tar.gz rpmdrake-25b509fb3abe00f143be1cf32003bb7f6dbe8213.tar.bz2 rpmdrake-25b509fb3abe00f143be1cf32003bb7f6dbe8213.tar.xz rpmdrake-25b509fb3abe00f143be1cf32003bb7f6dbe8213.zip |
fix displaying of .rpmnew dialog when no .rpmnew files
-rwxr-xr-x | rpmdrake | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -683,6 +683,11 @@ Do you want to try another mirror?", $r), yesno => 1) and goto mu_retry_another_ sub dialog_rpmnew { my ($exitstatus, %p2r) = @_; + my $sum_rpmnew = sum(map { int @{$p2r{$_}} } keys %p2r); + if ($exitstatus == 0 && $sum_rpmnew == 0) { + interactive_msg(_("Everything installed successfully"), _("All requested packages were installed successfully.")); + return; + } my $d = my_gtk->new(_("Installation finished")); my $inspect = sub { my ($file) = @_; @@ -730,7 +735,7 @@ sub dialog_rpmnew { }) ] } @{$p2r{$pkg}} } keys %p2r)), - $typical_width*1.5, 70 + sum(map { int @{$p2r{$_}} } keys %p2r)*20), + $typical_width*1.5, 70 + $sum_rpmnew*20), gtkpack__(create_hbox(), gtksignal_connect(new Gtk::Button(_("Ok")), clicked => sub { Gtk->main_quit })))); $d->main; } @@ -790,10 +795,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( $u =~ m|/([^/]+-[^-]+-[^-]+)\.[^\./]+\.rpm$| and $pkg2rpmnew{$1} = [ grep { m|^/etc| && -r "$_.rpmnew" && !member($_, @ignores_rpmnew) } map { chomp_($_) } `rpm -ql $1` ]; } - if ($exitstatus == 0 && keys(%pkg2rpmnew) == 0) { - interactive_msg(_("Everything installed successfully"), _("All requested packages were installed successfully.")); - } - keys(%pkg2rpmnew) > 0 and dialog_rpmnew($exitstatus, %pkg2rpmnew); + dialog_rpmnew($exitstatus, %pkg2rpmnew); } else { interactive_msg(_("Everything already installed."), _("Everything already installed (is this supposed to happen at all?).")); |