aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpmdrake.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index fe8fa838..2f72729c 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -381,12 +381,11 @@ my %sites2countries = (
#- the parameter indicates whether we want base or update sources
sub distro_type {
my ($want_base_distro) = @_;
- return 'cooker' if $mandrake_release =~ /cooker/i;
- return 'updates' if $mandrake_release !~ /community/i;
+ return 'cooker' if $mandrake_release =~ /cooker/i;
+ return 'official' if $want_base_distro && $mandrake_release =~ /official/i;
+ return 'updates' if $mandrake_release !~ /community/i;
(my $v) = split / /, cat_('/etc/version');
- return $v =~ /\.0$/ ? 'community' : (
- $want_base_distro ? 'official' : 'updates'
- );
+ return $v =~ /\.0$/ ? 'community' : 'updates';
}
sub compat_arch_for_updates($) {
@@ -520,7 +519,7 @@ by Mandrakelinux Official Updates.")
sub make_url_mirror {
my ($mirror) = @_;
- if ($mirror =~ m!/(?:RPMS|media/main)\Z!) {
+ if ($mirror =~ m!/(?:RPMS|media/main)/?\Z!) {
#- esp. for distro_type() =~ /cooker|community/
"$mirror/";
} else {
@@ -532,7 +531,7 @@ sub make_url_mirror {
sub make_url_mirror_dist {
my ($mirror) = @_;
- $mirror =~ s!/(?:RPMS|media/main)\Z!/!;
+ $mirror =~ s!/(?:RPMS|media/main)/?\Z!/!;
$mirror;
}