diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-10-08 19:30:58 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-10-08 19:30:58 +0000 |
commit | f51f032827f0cba351e949c870469e8901ea5a23 (patch) | |
tree | cf5692d6db7e3631bf4929e4afd0427509ddc830 /rpmdrake.pm | |
parent | cfe178df6a04c99a53ff5a81769734bd85c24183 (diff) | |
download | rpmdrake-f51f032827f0cba351e949c870469e8901ea5a23.tar rpmdrake-f51f032827f0cba351e949c870469e8901ea5a23.tar.gz rpmdrake-f51f032827f0cba351e949c870469e8901ea5a23.tar.bz2 rpmdrake-f51f032827f0cba351e949c870469e8901ea5a23.tar.xz rpmdrake-f51f032827f0cba351e949c870469e8901ea5a23.zip |
(add_distrib_update_media) factorize code
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index c2809932..512b473f 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -54,6 +54,7 @@ our @EXPORT = qw( $tree_mode $tree_flat $typical_width + add_distrib_update_media distro_type to_utf8 myexit @@ -876,6 +877,18 @@ It will be disabled.", 1; } +sub add_distrib_update_media { + my ($urpm, $name, $mirror, %options) = @_; + my $is_update = $mirror->{type} eq 'updates'; + add_medium_and_check( + $urpm, + { nolock => 1, distrib => 1 }, + $name, $mirror->{url}, probe_with => 'synthesis', %options, + usedistrib => 1, + if_($is_update, only_updates => 1), + ); +} + sub open_help { my ($mode) = @_; use run_program; |