diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-17 17:10:01 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-17 17:10:01 +0000 |
commit | 3721966b585ae1f4276d7ce0c0f3516ec914dea5 (patch) | |
tree | cb2cc299fecd47c0f92eada4015064bad592d8eb /rpmdrake.pm | |
parent | 830422a46e08e0b687fb41354d778db14d627db6 (diff) | |
download | rpmdrake-3721966b585ae1f4276d7ce0c0f3516ec914dea5.tar rpmdrake-3721966b585ae1f4276d7ce0c0f3516ec914dea5.tar.gz rpmdrake-3721966b585ae1f4276d7ce0c0f3516ec914dea5.tar.bz2 rpmdrake-3721966b585ae1f4276d7ce0c0f3516ec914dea5.tar.xz rpmdrake-3721966b585ae1f4276d7ce0c0f3516ec914dea5.zip |
Fix logic error in the function that computes distro type
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 13 |
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; } |