summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-11 16:15:47 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-11 16:15:47 +0000
commit2ab66043697edbdcbb5b938361f7f0cf4a654275 (patch)
tree248b74464da2f3aab6e0938c9453cd8ec38f010a /urpm.pm
parentd783fd9a9d1c1771edf81fc050d77f1b705754e3 (diff)
downloadurpmi-2ab66043697edbdcbb5b938361f7f0cf4a654275.tar
urpmi-2ab66043697edbdcbb5b938361f7f0cf4a654275.tar.gz
urpmi-2ab66043697edbdcbb5b938361f7f0cf4a654275.tar.bz2
urpmi-2ab66043697edbdcbb5b938361f7f0cf4a654275.tar.xz
urpmi-2ab66043697edbdcbb5b938361f7f0cf4a654275.zip
Document add_distrib_media and add a new option to it (initial_number)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 07342f35..da0880b2 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -676,6 +676,11 @@ sub add_medium {
#- add distribution media, according to url given.
#- returns the list of names of added media.
+#- options :
+#- - limit_rate, compress : for downloading files
+#- - initial_number : when adding several numbered media, start with this number
+#- - probe_with : if eq 'synthesis', use synthesis instead of hdlists
+#- other options are passed to add_medium()
sub add_distrib_media {
my ($urpm, $name, $url, %options) = @_;
my ($hdlists_file);
@@ -738,7 +743,7 @@ sub add_distrib_media {
#- at this point, we have found an hdlists file, so parse it
#- and create all necessary media according to it.
if (open my $hdlistsfh, $hdlists_file) {
- my $medium = 1;
+ my $medium = $options{initial_number} || 1;
foreach (<$hdlistsfh>) {
chomp;
s/\s*#.*$//;