summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-08 14:15:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-08 14:15:17 +0000
commit21c8ebddce1e8d6bd3122f2cc9d52d0abc346930 (patch)
treecc9ccb2c4ddf1c26861661ad78641ef13ec518fe
parent9995bbc5a46a100fbe4b2d161e22933ae77e8e35 (diff)
downloadurpmi-21c8ebddce1e8d6bd3122f2cc9d52d0abc346930.tar
urpmi-21c8ebddce1e8d6bd3122f2cc9d52d0abc346930.tar.gz
urpmi-21c8ebddce1e8d6bd3122f2cc9d52d0abc346930.tar.bz2
urpmi-21c8ebddce1e8d6bd3122f2cc9d52d0abc346930.tar.xz
urpmi-21c8ebddce1e8d6bd3122f2cc9d52d0abc346930.zip
create get_medium_option() for future use
-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;