From 2ff99e1dd0e4ccac3a4c88686775686b5b9e418d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 11 Jan 2005 17:42:26 +0000 Subject: Add a function make_url_mirror_dist to get the url for a mirror for a distribution (as opposed to a mirror for updates) --- rpmdrake.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpmdrake.pm b/rpmdrake.pm index 3ef5eb00..430b078b 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -64,6 +64,7 @@ our @EXPORT = qw( mirrors choose_mirror make_url_mirror + make_url_mirror_dist show_urpm_progress update_sources update_sources_interactive @@ -514,6 +515,12 @@ sub make_url_mirror { } } +sub make_url_mirror_dist { + my ($mirror) = @_; + $mirror =~ s!/(?:RPMS|media/main)\Z!/!; + $mirror; +} + sub show_urpm_progress { my ($label, $pb, $mode, $file, $percent, $total, $eta, $speed) = @_; $file =~ s|([^:]*://[^/:\@]*:)[^/:\@]*(\@.*)|$1xxxx$2|; #- if needed... -- cgit v1.2.1