summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-08 14:54:00 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-08 14:54:00 +0000
commit1dcbd983b554e2a21f9ec062f17580a8901943a5 (patch)
treea024d68faeeb9cda2c8b6ef57204e395f8ca9cc7
parent78f785b808aecbf21f5f76bdf641d2c1638cf396 (diff)
downloaddrakx-1dcbd983b554e2a21f9ec062f17580a8901943a5.tar
drakx-1dcbd983b554e2a21f9ec062f17580a8901943a5.tar.gz
drakx-1dcbd983b554e2a21f9ec062f17580a8901943a5.tar.bz2
drakx-1dcbd983b554e2a21f9ec062f17580a8901943a5.tar.xz
drakx-1dcbd983b554e2a21f9ec062f17580a8901943a5.zip
More heuristics to figure out the CD / DVD number from its name, used
for the copy of media to the local HD.
-rw-r--r--perl-install/install_any.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e1b2f4e2d..079005901 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -85,13 +85,19 @@ sub askChangeMedium($$) {
$allow;
}
-#- guess the CD number from a media description
+#- guess the CD number from a media description.
+#- XXX lots of heuristics here, must design this properly
sub getCDNumber {
my ($description) = @_;
(my $cd) = $description =~ /\b(?:CD|DVD) ?(\d+)\b/i;
+ if (!$cd) { #- test for single unnumbered DVD
+ $cd = 1 if $description =~ /\bDVD\b/i;
+ }
if (!$cd) { #- test for mini-ISO
$cd = 1 if $description =~ /\bmini.?cd\b/i;
}
+ #- don't mix suppl. cds with regular ones
+ if ($description =~ /suppl/i) { $cd += 100 }
$cd;
}