diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-11-23 18:03:00 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-11-23 18:03:00 +0000 |
commit | cbaa2c3f991de19a1782a3afd6f5a27b9d4326d7 (patch) | |
tree | bcd039fafce1f6593ce51a629b54cfde5722bee6 /rpmdrake.pm | |
parent | 3f1eb3643e784ce974bdfadfbbf01f4e532f2c87 (diff) | |
download | rpmdrake-cbaa2c3f991de19a1782a3afd6f5a27b9d4326d7.tar rpmdrake-cbaa2c3f991de19a1782a3afd6f5a27b9d4326d7.tar.gz rpmdrake-cbaa2c3f991de19a1782a3afd6f5a27b9d4326d7.tar.bz2 rpmdrake-cbaa2c3f991de19a1782a3afd6f5a27b9d4326d7.tar.xz rpmdrake-cbaa2c3f991de19a1782a3afd6f5a27b9d4326d7.zip |
(add_medium_and_check, update_sources, update_sources_interactive) more conversion to new urpmi API
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index 8d6496c3..86b83735 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -27,6 +27,7 @@ package rpmdrake; use lib qw(/usr/lib/libDrakX); use urpm::download (); use urpm::prompt; +use urpm::media; use MDK::Common; use MDK::Common::System; @@ -688,7 +689,7 @@ sub update_sources { my @media; @media = @{$options{medialist}} if ref $options{medialist}; my $outerfatal = $urpm->{fatal}; local $urpm->{fatal} = sub { $w->destroy; $outerfatal->(@_) }; - $urpm->update_media( + urpm::media::update_media($urpm, %options, callback => sub { $cancel and goto cancel_update; @@ -774,7 +775,7 @@ sub update_sources_interactive { foreach (@{$urpm->{media}}) { $_->{modified} and delete $_->{ignore}; } - $urpm->select_media(@media); + urpm::media::select_media($urpm, @media); update_sources_check( $urpm, {}, @@ -794,9 +795,9 @@ sub add_medium_and_check { local $urpm->{fatal} = sub { printf STDERR "Fatal: %s\n", $_[1]; $fatal_msg = $_[1]; goto fatal_error }; local $urpm->{error} = sub { printf STDERR "Error: %s\n", $_[0]; push @error_msgs, $_[0] }; if ($options->{distrib}) { - @newnames = $urpm->add_distrib_media(@_); + @newnames = urpm::media::add_distrib_media($urpm, @_); } else { - $urpm->add_medium(@_); + urpm::media::add_medium($urpm, @_); } if (@error_msgs) { interactive_msg( |