aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xedit-urpm-sources.pl3
-rwxr-xr-xrpmdrake3
-rw-r--r--rpmdrake.pm11
-rw-r--r--rpmdrake.spec2
4 files changed, 14 insertions, 5 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index 5bd34a66..a534bcc0 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -80,8 +80,7 @@ sub add_callback {
if_($info->{securitysel}, 0, gtksignal_connect(Gtk2::Button->new(but(N("Choose a mirror..."))),
clicked => sub { my $m = choose_mirror();
if ($m) {
- my ($r) = cat_('/etc/mandrake-release') =~ /release\s(\S+)/;
- $info->{url_entry}->set_text("$m/$r/RPMS/");
+ $info->{url_entry}->set_text(make_url_mirror($m));
$info->{hdlist_entry}->set_text('../base/hdlist.cz');
$info->{hdlist_entry}->set_sensitive(1);
$info->{hdlist_check}->set_active(1);
diff --git a/rpmdrake b/rpmdrake
index 74349c27..1337955f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -929,9 +929,8 @@ launch the Software Media Manager, and then add a `Security
updates' medium.
Then, restart MandrakeUpdate.", $update_name)), myexit(-1);
- my ($r) = cat_('/etc/mandrake-release') =~ /release\s(\S+)/;
add_medium_and_check($urpm, N("Please wait, adding medium..."), {},
- $update_name, "$m/$r/RPMS/", '../base/hdlist.cz', update => 1);
+ $update_name, make_url_mirror($m), '../base/hdlist.cz', update => 1);
@update_medias = { name => $update_name }; #- hack to simulate a medium for parsing of descriptions
}
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...
diff --git a/rpmdrake.spec b/rpmdrake.spec
index d141c643..0678c8c1 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -105,6 +105,8 @@ rm -rf $RPM_BUILD_ROOT
- edit-urpm-media:
- handle modality in parallel and key editors
- fix #4914 (program crashes when trying to add a medium)
+- MandrakeUpdate: handle subdirectory in "updates" for special
+ Mandrake issues such as corporate/clustering/etc
* Wed Aug 13 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-31mdk
- require root capability when run "Install Sofware" and add a new