aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-01-21 10:58:56 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-01-21 10:58:56 +0000
commit9bc390516a520c7588787a95e15426110372b7ad (patch)
tree7922bd050670aa64d55035be10b389a747f6da89 /rpmdrake.pm
parent76eaefe65a3b2b13db08de0571e2c3e157c35fec (diff)
downloadrpmdrake-9bc390516a520c7588787a95e15426110372b7ad.tar
rpmdrake-9bc390516a520c7588787a95e15426110372b7ad.tar.gz
rpmdrake-9bc390516a520c7588787a95e15426110372b7ad.tar.bz2
rpmdrake-9bc390516a520c7588787a95e15426110372b7ad.tar.xz
rpmdrake-9bc390516a520c7588787a95e15426110372b7ad.zip
fix "update sources" dialog which didn't update the asked mediums
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index aa4dbca8..b99c24f9 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -337,7 +337,7 @@ by Mandrake Linux Official Updates.")), return '';
sub update_sources {
my ($urpm, %opts) = @_;
my $w = ugtk2->new(N("Update source(s)"), grab => 1, center => 1, %opts);
- my (@buttons, @sources_to_update);
+ my @buttons;
gtkadd($w->{window},
gtkpack__(Gtk2::VBox->new(0,5),
Gtk2::Label->new(N("Select the source(s) you wish to update:")),
@@ -345,13 +345,12 @@ sub update_sources {
Gtk2::HSeparator->new,
gtkpack(create_hbox(),
gtksignal_connect(Gtk2::Button->new(N("Update")), clicked => sub {
- $w->{retval} = 1;
- @sources_to_update = grep { $_->get_active } @buttons;
+ $w->{retval} = any { $_->get_active } @buttons;
+ each_index { $_->get_active and $urpm->select_media($urpm->{media}[$::i]{name}) } @buttons;
Gtk2->main_quit;
}),
gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }))));
- if ($w->main && @sources_to_update) {
- each_index { $urpm->select_media($urpm->{media}[$::i]{name}) } @sources_to_update;
+ if ($w->main) {
foreach (@{$urpm->{media}}) { #- force ignored media to be returned alive (forked from urpmi.updatemedia...)
$_->{modified} and delete $_->{ignore};
}