aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-11 17:42:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-11 17:42:26 +0000
commit2ff99e1dd0e4ccac3a4c88686775686b5b9e418d (patch)
tree25bc528498a1ea178a9675dce2e1d860d9df1481 /rpmdrake.pm
parent0c5eb5f58deec9307353b0f96dada4bb74d338f1 (diff)
downloadrpmdrake-2ff99e1dd0e4ccac3a4c88686775686b5b9e418d.tar
rpmdrake-2ff99e1dd0e4ccac3a4c88686775686b5b9e418d.tar.gz
rpmdrake-2ff99e1dd0e4ccac3a4c88686775686b5b9e418d.tar.bz2
rpmdrake-2ff99e1dd0e4ccac3a4c88686775686b5b9e418d.tar.xz
rpmdrake-2ff99e1dd0e4ccac3a4c88686775686b5b9e418d.zip
Add a function make_url_mirror_dist to get the url for a mirror for
a distribution (as opposed to a mirror for updates)
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm7
1 files changed, 7 insertions, 0 deletions
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...