summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-03 05:39:42 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-03 05:39:42 +0000
commit5f0477547b3122c61cb11f97e5d2dfac8932fcce (patch)
tree8852e4950cf1c63f0198a9d4fad2de558d213142 /perl-install
parent9459533085f13f924f8540dd3196c097b98e301c (diff)
downloaddrakx-5f0477547b3122c61cb11f97e5d2dfac8932fcce.tar
drakx-5f0477547b3122c61cb11f97e5d2dfac8932fcce.tar.gz
drakx-5f0477547b3122c61cb11f97e5d2dfac8932fcce.tar.bz2
drakx-5f0477547b3122c61cb11f97e5d2dfac8932fcce.tar.xz
drakx-5f0477547b3122c61cb11f97e5d2dfac8932fcce.zip
The mandrakelinux-release package doesn't exist any more, so you can't
deduce the version from it. Something more robust than this needs to be figured out.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/crypto.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index 3e362fdf8..23b4dc93f 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -146,11 +146,13 @@ sub bestMirror {
$possible[rand @possible];
}
-#- hack to retrieve Mandrivaalinux version...
+#- hack to retrieve Mandriva Linux version... XXX figure out something more robust
sub version() {
require pkgs;
- my $pkg = pkgs::packageByName($::o->{packages}, 'mandrakelinux-release');
- $pkg && $pkg->version || '9.1'; #- safe but dangerous ;-)
+ my $pkg = pkgs::packageByName($::o->{packages}, 'mandriva-release');
+ my $v = $pkg && $pkg->version || '10.2'; #- safe but dangerous ;-)
+ $v eq '2006.0' and $v = '10.2';
+ $v;
}
sub dir { $mirrors{$_[0]}[1] }