Mageia Bugzilla – Attachment 3857 Details for
Bug 9545
rpmdrake erroneously shows that both the updated package and the removed package are identical (have the same version)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
fix retrieving uninstalled package name
9545.diff (text/plain), 1.95 KB, created by
Thierry Vignaud
on 2013-05-01 04:45:35 CEST
(
hide
)
Description:
fix retrieving uninstalled package name
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2013-05-01 04:45:35 CEST
Size:
1.95 KB
patch
obsolete
>diff --git a/gurpm/RPMProgressDialog.pm b/gurpm/RPMProgressDialog.pm >index f4748f5..480e7e0 100644 >--- a/gurpm/RPMProgressDialog.pm >+++ b/gurpm/RPMProgressDialog.pm >@@ -51,7 +51,7 @@ sub title { > my ($mainw, $urpm, $old_main_window); > > my $progressbar_size = 450; >-my ($progress_nb, $download_nb, $uninst_count); >+my ($progress_nb, $download_nb); > > > =head2 Creators >@@ -164,7 +164,7 @@ sub init_progressbar { > $progressbar->set_size_request($progressbar_size, -1); > $vbox->pack_start($progressbar, 0, 0, 0); > $w->{progressbar} = $progressbar; >- $progress_nb = $download_nb = $uninst_count = 0; >+ $progress_nb = $download_nb = 0; > > $w->change_widget($vbox); > } >@@ -188,8 +188,8 @@ Update the progress bar > > sub set_progressbar { > my ($w, $local_ratio) = @_; >- if ($progress_nb || $download_nb || $uninst_count) { # this happens when computing transaction >- $w->{global_progressbar}->set_fraction(($download_nb + $progress_nb + $uninst_count - 1 + $local_ratio) / 2 / $urpm->{nb_install}); >+ if ($progress_nb || $download_nb) { # this happens when computing transaction >+ $w->{global_progressbar}->set_fraction(($download_nb + $progress_nb - 1 + $local_ratio) / 2 / $urpm->{nb_install}); > } > $w->{progressbar}->set_fraction($local_ratio); > } >@@ -305,15 +305,13 @@ sub callback_inst { > my $pkg = defined $id ? $urpm->{depslist}[$id] : undef; > if ($subtype eq 'start') { > if ($type eq 'trans') { >- $uninst_count = 0; > $mainw->set_progresslabel(N("Preparing...")); > } else { > my $msg; >+ $progress_nb++; > if ($type eq 'uninst') { >- $msg = N("Removing package `%s' ...", $urpm->{trans}->Element_fullname($uninst_count)); >- $uninst_count++; >+ $msg = N("Removing package `%s' ...", $urpm->{trans}->Element_fullname($progress_nb-1)); > } else { >- $progress_nb++; > $msg = N("Installing package `%s' (%s/%s)...", $pkg->name, $progress_nb, $urpm->{nb_install}); > } > $download_nb = max($download_nb, $progress_nb);
diff --git a/gurpm/RPMProgressDialog.pm b/gurpm/RPMProgressDialog.pm index f4748f5..480e7e0 100644 --- a/gurpm/RPMProgressDialog.pm +++ b/gurpm/RPMProgressDialog.pm @@ -51,7 +51,7 @@ sub title { my ($mainw, $urpm, $old_main_window); my $progressbar_size = 450; -my ($progress_nb, $download_nb, $uninst_count); +my ($progress_nb, $download_nb); =head2 Creators @@ -164,7 +164,7 @@ sub init_progressbar { $progressbar->set_size_request($progressbar_size, -1); $vbox->pack_start($progressbar, 0, 0, 0); $w->{progressbar} = $progressbar; - $progress_nb = $download_nb = $uninst_count = 0; + $progress_nb = $download_nb = 0; $w->change_widget($vbox); } @@ -188,8 +188,8 @@ Update the progress bar sub set_progressbar { my ($w, $local_ratio) = @_; - if ($progress_nb || $download_nb || $uninst_count) { # this happens when computing transaction - $w->{global_progressbar}->set_fraction(($download_nb + $progress_nb + $uninst_count - 1 + $local_ratio) / 2 / $urpm->{nb_install}); + if ($progress_nb || $download_nb) { # this happens when computing transaction + $w->{global_progressbar}->set_fraction(($download_nb + $progress_nb - 1 + $local_ratio) / 2 / $urpm->{nb_install}); } $w->{progressbar}->set_fraction($local_ratio); } @@ -305,15 +305,13 @@ sub callback_inst { my $pkg = defined $id ? $urpm->{depslist}[$id] : undef; if ($subtype eq 'start') { if ($type eq 'trans') { - $uninst_count = 0; $mainw->set_progresslabel(N("Preparing...")); } else { my $msg; + $progress_nb++; if ($type eq 'uninst') { - $msg = N("Removing package `%s' ...", $urpm->{trans}->Element_fullname($uninst_count)); - $uninst_count++; + $msg = N("Removing package `%s' ...", $urpm->{trans}->Element_fullname($progress_nb-1)); } else { - $progress_nb++; $msg = N("Installing package `%s' (%s/%s)...", $pkg->name, $progress_nb, $urpm->{nb_install}); } $download_nb = max($download_nb, $progress_nb);
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9545
:
3780
|
3781
|
3782
|
3798
| 3857 |
3863
|
3864
|
3865
|
3866
|
3867