From 21c8ebddce1e8d6bd3122f2cc9d52d0abc346930 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 8 Jan 2008 14:15:17 +0000 Subject: create get_medium_option() for future use --- urpm/media.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/urpm/media.pm b/urpm/media.pm index 366f6363..87966dd1 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -31,6 +31,12 @@ our @PER_MEDIA_OPT = qw( with_synthesis ); +sub get_medium_option { + my ($urpm, $medium, $option_name) = @_; + + defined $medium->{$option_name} ? $medium->{$option_name} : $urpm->{options}{$option_name}; +} + sub only_media_opts { my ($m) = @_; my %m = map { $_ => $m->{$_} } grep { defined $m->{$_} } @PER_MEDIA_OPT; -- cgit v1.2.1