summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm6
1 files changed, 6 insertions, 0 deletions
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;