aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-08-29 11:46:59 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-08-29 11:46:59 +0000
commitffd943cbb68c9f3a2ce508b9391735c7a17a8335 (patch)
treef71ada51e69fbf47274800eb2191f39c595e6915 /rpmdrake.pm
parent94ffe6c186061726fb727547d4f60aaf723348b5 (diff)
downloadrpmdrake-ffd943cbb68c9f3a2ce508b9391735c7a17a8335.tar
rpmdrake-ffd943cbb68c9f3a2ce508b9391735c7a17a8335.tar.gz
rpmdrake-ffd943cbb68c9f3a2ce508b9391735c7a17a8335.tar.bz2
rpmdrake-ffd943cbb68c9f3a2ce508b9391735c7a17a8335.tar.xz
rpmdrake-ffd943cbb68c9f3a2ce508b9391735c7a17a8335.zip
handle subdirectory in "updates" for special
Mandrake issues such as corporate/clustering/etc
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index cf237657..cb16569b 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -38,7 +38,9 @@ use curl_download;
@ISA = qw(Exporter);
@EXPORT = qw($configfile %config $mandrakeupdate_wanted_categories $already_splashed $max_info_in_descr $typical_width
- N translate myexit readconf writeconf interactive_msg interactive_packtable interactive_list fatal_msg wait_msg remove_wait_msg but but_ slow_func mirrors choose_mirror show_urpm_progress update_sources update_sources_interactive add_medium_and_check);
+ N translate myexit readconf writeconf interactive_msg interactive_packtable interactive_list fatal_msg
+ wait_msg remove_wait_msg but but_ slow_func mirrors choose_mirror make_url_mirror show_urpm_progress
+ update_sources update_sources_interactive add_medium_and_check);
eval { require ugtk2; ugtk2->import(qw(:all)) };
@@ -349,6 +351,13 @@ by Mandrake Linux Official Updates.")), return '';
$w->main && member($w->{retval}{sel}, map { $_->{url} } @mirrors) and $w->{retval}{sel};
}
+sub make_url_mirror {
+ my ($mirror) = @_;
+ my ($class, $release) = cat_('/etc/mandrake-release') =~ /(\S+)\s+release\s+(\S+)/;
+ $class !~ /linux/i and $release = lc($class) . "/$release"; #- handle subdirectory for corporate/clustering/etc
+ return "$mirror/$release/RPMS/";
+}
+
sub show_urpm_progress {
my ($label, $pb, $mode, $file, $percent, $total, $eta, $speed) = @_;
$file =~ s|([^:]*://[^/:\@]*:)[^/:\@]*(\@.*)|$1xxxx$2|; #- if needed...