aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-03 09:50:16 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-03 09:50:16 +0000
commit25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59 (patch)
treedc367235b99fdfb95e0ab33f802184f25b47670b /Rpmdrake
parent483f63b1e94e40d91ff1106fd056e9af8b9daaa2 (diff)
downloadrpmdrake-25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59.tar
rpmdrake-25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59.tar.gz
rpmdrake-25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59.tar.bz2
rpmdrake-25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59.tar.xz
rpmdrake-25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59.zip
(get_medium_type) introduce it in order to get medium type (needed for #25043)
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-xRpmdrake/edit_urpm_sources.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 97fd0cdb..801284c3 100755
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -52,6 +52,23 @@ my %col = (
},
);
+
+sub get_medium_type {
+ my ($medium) = @_;
+ my %medium_type = (
+ ftp => N("FTP"),
+ file => N("Local"),
+ http => N("HTTP"),
+ https => N("HTTPS"),
+ nfs => N("NFS"),
+ removable => N("Removable"),
+ rsync => N("rsync"),
+ ssh => N("NFS"),
+ );
+ return $medium_type{$1} if $medium->{url} =~ m!^([^:]*)://!;
+ return N("Local");
+}
+
sub selrow {
my ($o_list_tv) = @_;
defined $o_list_tv or $o_list_tv = $list_tv;