summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-04 14:17:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-04 14:17:15 +0000
commitf7bee8d26d4395332b6fdbf3722ae55c31e0238f (patch)
tree1ce4beb1715ca60f1fa22d45e5cc7b82d4aa3ad0 /perl-install
parenta8d2318343b50494f5d458ef89474ee5287f5302 (diff)
downloaddrakx-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar
drakx-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar.gz
drakx-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar.bz2
drakx-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.tar.xz
drakx-f7bee8d26d4395332b6fdbf3722ae55c31e0238f.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfigurator.pm2
-rw-r--r--perl-install/install2.pm6
-rw-r--r--perl-install/install_any.pm17
-rw-r--r--perl-install/install_steps_gtk.pm57
-rw-r--r--perl-install/install_steps_interactive.pm69
-rw-r--r--perl-install/pkgs.pm26
-rw-r--r--perl-install/share/compssList37
-rw-r--r--perl-install/timezone.pm4
8 files changed, 128 insertions, 90 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 644b94a3b..44721b4ea 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -399,6 +399,8 @@ sub autoDefaultDepth($$) {
my ($card, $wres_wanted) = @_;
my ($best, $depth);
+ return 24 if $card->{identifier} =~ /SiS/;
+
if ($card->{server} eq 'FBDev') {
return 16; #- this should work by default, FBDev is allowed only if install currently uses it at 16bpp.
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 00aeb8fc2..2b6da107d 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -334,6 +334,12 @@ sub formatPartitions {
mkdir "$o->{prefix}/$_", 0700 foreach qw(root);
raid::prepare_prefixed($o->{raid}, $o->{prefix});
+
+ #-noatime option for ext2 fs on laptops (do not wake up the hd)
+ #- Do not update inode access times on this
+ #- file system (e.g, for faster access on the
+ #- news spool to speed up news servers).
+ $_->{options} = "noatime" foreach grep { isExt2($_) } @{$o->{fstab}};
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index d6a696c37..e9905906a 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -104,7 +104,7 @@ sub getAvailableSpace {
if ($::testing) {
log::l("taking 200MB for testing");
- return 200 << 20;
+ return 2000 << 20;
}
die "missing root partition";
}
@@ -503,9 +503,9 @@ sub install_urpmi {
ftp => $ENV{URLPREFIX},
http => $ENV{URLPREFIX},
cdrom => "removable_cdrom_1://mnt/cdrom" }}{$method};
- local *FILES; open FILES, "hdlist2files $f|";
+ local *FILES; open FILES, "hdlist2names $f|";
chop, print LIST "$dir/Mandrake/RPMS/$_\n" foreach <FILES>;
- close FILES or log::l("hdlist2files failed"), return;
+ close FILES or log::l("hdlist2names failed"), return;
run_program::run("gzip", "-9", $f);
@@ -577,6 +577,17 @@ sub kderc_largedisplay($) {
kpaneliconstyle => "kpanelIconStyle=Normal\n", #- to change to Large when icons looks better
kdeiconstyle => "KDEIconStyle=Large\n",
});
+ foreach ("/etc/skel", "/root", list_home()) {
+ my $found;
+ substInFile {
+ $found ||= /KFM Misc Defaults/;
+ $_ .=
+"[KFM Misc Defaults]
+GridWidth=78
+GridHeight=75
+" if eof && !$found;
+ } "$prefix$_/.kde/share/config/kfmrc"
+ }
}
sub kdelang_postinstall($) {
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 06cc9809f..8aab6a083 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -259,8 +259,9 @@ sub doPartitionDisks($$) {
_("WARNING!
DrakX now needs to resize your Windows partition. Be careful: this operation is
-dangerous. If you have not already done so, you should first run scandisk (and
-optionally run defrag) on this partition and backup your data.
+dangerous. If you have not already done so, you should first exit the
+installation, run scandisk under Windows (and optionally run defrag), then
+restart the installation. You should also backup your data.
When sure, press Ok."))) {
my $hd = $hds->[0];
my $oldsize = $part->{size};
@@ -299,29 +300,18 @@ When sure, press Ok."))) {
}
#------------------------------------------------------------------------------
-sub choosePackages {
- my ($o, $packages, $compss, $compssUsers, $compssUsersSorted, $first_time) = @_;
-
- if ($::beginner) {
- require pkgs;
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, install_any::getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{isUpgrade});
- } else {
- install_steps_interactive::choosePackages(@_);
- chooseSizeToInstall(@_);
- choosePackagesTree(@_) if $::expert;
- }
-}
sub chooseSizeToInstall {
- my ($o, $packages, $compss, $compssUsers, $first_time) = @_;
- my $availableSpace = int(install_any::getAvailableSpace($o) / sqr(1024));
- my $current = pkgs::correctedSelectedSize($packages);
+ my ($o, $packages, $min_size, $max_size) = @_;
+ my ($min, $max) = map { pkgs::correctSize($_ / sqr(1024)) } $min_size, $max_size;
my $w = my_gtk->new('');
- my $adj = create_adjustment($current * 1.3, $current, $availableSpace);
+ my $adj = create_adjustment($max, $min, $max);
my $spin = gtkset_usize(new Gtk::SpinButton($adj, 0, 0), 100, 0);
gtkadd($w->{window},
gtkpack(new Gtk::VBox(0,20),
- _("Going to install %d MB. You can choose to install more programs", $current) .
+_("Now that you've selected desired groups, please choose
+how many packages you want, ranging from minimal to full
+installation of each selected groups.") .
($::expert ? "\n" . _("You will be able to choose more precisely in next step") : ''),
create_packtable({ col_spacings => 10 },
[ _("Choose the size you want to install"), $spin, _("MB"), ],
@@ -332,12 +322,7 @@ sub chooseSizeToInstall {
);
$spin->signal_connect(activate => sub { $w->{retval} = 1; Gtk->main_quit });
$spin->grab_focus();
- $w->main or return;
-
- ($o->{packages_}{ind}, $o->{packages_}{select_level}) =
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 1,
- pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024),
- $o->{installClass}, $o->{isUpgrade});
+ $w->main and pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024);
}
sub choosePackagesTree {
my ($o, $packages, $compss) = @_;
@@ -433,17 +418,17 @@ sub choosePackagesTree {
&$update();
});
- my $select_add = sub {
- my ($ind, $level) = @{$o->{packages_}}{"ind", "select_level"};
- $level = max(0, min(100, ($level + $_[0])));
- $o->{packages_}{select_level} = $level;
-
- pkgs::unselect_all($packages);
- foreach (pkgs::allpackages($packages)) {
- pkgs::select($packages, $_) if $_->{values}[$ind] >= $level;
- }
- &$update;
- };
+#- my $select_add = sub {
+#- my ($ind, $level) = @{$o->{packages_}}{"ind", "select_level"};
+#- $level = max(0, min(100, ($level + $_[0])));
+#- $o->{packages_}{select_level} = $level;
+#-
+#- pkgs::unselect_all($packages);
+#- foreach (pkgs::allpackages($packages)) {
+#- pkgs::select($packages, $_) if $_->{values}[$ind] >= $level;
+#- }
+#- &$update;
+#- };
my $show_add = sub {
my ($ind, $level) = @{$o->{packages_}}{"ind", "show_level"};
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index cca487be1..1cedbccf7 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -231,33 +231,66 @@ sub selectPackagesToUpgrade {
}
#------------------------------------------------------------------------------
sub choosePackages {
- my ($o, $packages, $compss, $compssUsers, $compssUsersSorted) = @_;
- my $availableSpace = int(install_any::getAvailableSpace($o) / sqr(1024));
+ my ($o, $packages, $compss, $compssUsers, $compssUsersSorted, $first_time) = @_;
require pkgs;
+ unless ($o->{isUpgrade}) {
+ my $available = pkgs::invCorrectSize(install_any::getAvailableSpace($o) / sqr(1024)) * sqr(1024);
+
+ delete $_->{skip} foreach values %$packages;
+ pkgs::unselect_all($packages);
+ pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $::expert ? 95 : 80, $available, $o->{installClass});
+ my $min_size = pkgs::size_selected($packages);
+
+ do { $o->{compssUsersChoice}{$_} = 1 foreach @$compssUsersSorted, 'Miscellaneous' } if $first_time;
+ $o->chooseGroups($packages, $compssUsers, $compssUsersSorted) unless $::beginner;
+
+ my %save_selected; $save_selected{$_->{name}} = $_->{selected} foreach values %$packages;
+ pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, $available, $o->{installClass});
+ my $max_size = pkgs::size_selected($packages);
+ $_->{selected} = $save_selected{$_->{name}} foreach values %$packages;
+
+ my $size2install = $::beginner ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, $max_size);
+
+ ($o->{packages_}{ind}) =
+ pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, $size2install, $o->{installClass});
+
+# $_->{selected} and log::l("$_->{name}") foreach values %$packages;
+ }
+ $o->choosePackagesTree($packages, $compss) if $::expert;
+}
+
+sub chooseSizeToInstall {
+ my ($o, $packages, $min, $max) = @_;
+ install_any::getAvailableSpace($o) * 0.7;
+}
+sub choosePackagesTree {}
- #- alas, it through away any tree selected packages
- pkgs::unselect_all($o->{packages});
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $::expert ? 95 : 80, $availableSpace * 0.7, $o->{installClass}) unless $o->{isUpgrade};
+sub chooseGroups {
+ my ($o, $packages, $compssUsers, $compssUsersSorted) = @_;
$o->ask_many_from_list_ref('',
_("Package Group Selection"),
- [ @$compssUsersSorted ],
- [ map { \$o->{compssUsersChoice}{$_} } @$compssUsersSorted ]
- ) or goto &choosePackages;
- while (my ($k, $v) = each %{$o->{compssUsersChoice}}) {
- $v or next;
- pkgs::select($packages, $_) foreach @{$o->{compssUsers}{$k}};
+ [ @$compssUsersSorted, "Miscellaneous" ],
+ [ map { \$o->{compssUsersChoice}{$_} } @$compssUsersSorted, "Miscellaneous" ]
+ ) or goto &chooseGroups;
+
+ unless ($o->{compssUsersChoice}{Miscellaneous}) {
+ my %l;
+ $l{@{$compssUsers->{$_}}} = () foreach @$compssUsersSorted;
+# exists $l{$_} or print ">>$_\n" foreach keys %$packages;
+ exists $l{$_} or $packages->{$_}{skip} = 1 foreach keys %$packages;
}
- my $current = pkgs::correctedSelectedSize($packages);
- if ($availableSpace < $current) {
- $o->ask_warn('', _("Too many packages chosen: %dMB doesn't fit in %dMB", $current, $availableSpace));
- goto &choosePackages;
+ foreach (@$compssUsersSorted) {
+ $o->{compssUsersChoice}{$_} or pkgs::skip_set($packages, @{$compssUsers->{$_}});
+ }
+ foreach (@$compssUsersSorted) {
+ $o->{compssUsersChoice}{$_} or next;
+ delete $_->{skip} foreach @{$compssUsers->{$_}};
}
-
my $f = "$o->{prefix}/etc/sysconfig/desktop";
- output($f, "KDE\n") if !-e $f && $o->{compssUsersChoice}{KDE};
- output($f, "GNOME\n") if !-e $f && $o->{compssUsersChoice}{Gnome};
+ output($f, "KDE\n") if $o->{compssUsersChoice}{KDE};
+ output($f, "GNOME\n") if $o->{compssUsersChoice}{Gnome};
}
#------------------------------------------------------------------------------
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 8e3ecf63f..660f55965 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -69,6 +69,7 @@ sub select($$;$) {
my ($packages, $p, $base) = @_;
my %preferred; @preferred{@preferred} = ();
my ($n, $v);
+# print "## $p->{name}\n";
unless ($p->{installed}) { #- if the same or better version is installed, do not select.
$p->{base} ||= $base;
$p->{selected} = -1; #- selected by user
@@ -88,6 +89,8 @@ sub select($$;$) {
$i->{deps} or log::l("missing deps for $n");
unless ($i->{installed}) {
unless ($i->{selected}) {
+# print ">> $i->{name}\n";
+# /gnome-games/ and print ">>> $i->{name}\n" foreach @{$i->{deps} || []};
$l{$_} ||= 0 foreach @{$i->{deps} || []};
}
$i->{selected}++ unless $i->{selected} == -1;
@@ -134,6 +137,19 @@ sub unselect_all($) {
$_->{selected} = $_->{base} foreach values %$packages;
}
+sub size_selected {
+ my ($packages) = @_;
+ my $nb = 0; foreach (values %$packages) {
+ $nb += $_->{size} if $_->{selected};
+ }
+ $nb;
+}
+
+sub skip_set {
+ my ($packages, @l) = @_;
+ $_->{skip} = 1 foreach @l, grep { $_ } map { Package($packages, $_) } map { @{$_->{provides} || []} } @l;
+}
+
sub psUsingDirectory(;$) {
my $dirname = $_[0] || "/tmp/rhimage/Mandrake/RPMS";
my %packages;
@@ -230,6 +246,7 @@ sub readCompssList($$$) {
local $_ = <$f>;
my $level = [ split ];
+ my $nb_values = 3;
my $e;
foreach (<$f>) {
/^\s*$/ || /^#/ and next;
@@ -251,7 +268,7 @@ sub readCompssList($$$) {
foreach ($locales, @{$p->{provides} || []}, @{$by_lang{$_} || []}) {
next if $done{$_}; $done{$_} = 1;
my $p = $packages->{$_} or next;
- $p->{values} = [ map { $_ + 70 } @{$p->{values}} ];
+ $p->{values} = [ map { $_ + 90 } @{$p->{values} || [ (0) x $nb_values ]} ];
}
}
$level;
@@ -289,7 +306,7 @@ sub readCompssUsers {
#- }
sub setSelectedFromCompssList {
- my ($compssListLevels, $packages, $min_level, $max_size, $install_class, $isUpgrade) = @_;
+ my ($compssListLevels, $packages, $min_level, $max_size, $install_class) = @_;
my ($ind);
my @packages = allpackages($packages);
@@ -302,15 +319,16 @@ sub setSelectedFromCompssList {
};
foreach (@places) {
my $p = $packages[$_];
+ next if $p->{skip};
last if $p->{values}[$ind] < $min_level;
- &select($packages, $p) unless $isUpgrade;
+ &select($packages, $p);
my $nb = 0; foreach (@packages) {
$nb += $_->{size} if $_->{selected};
}
if ($nb > $max_size) {
- unselect($packages, $p) unless $isUpgrade;
+ unselect($packages, $p);
$min_level = $p->{values}[$ind];
last;
}
diff --git a/perl-install/share/compssList b/perl-install/share/compssList
index 384ad650a..54285af1a 100644
--- a/perl-install/share/compssList
+++ b/perl-install/share/compssList
@@ -260,8 +260,6 @@ isapnptools 43 73 73
isdn4k-utils 26 30 10
isicom 20 0 13
ispell 49 0 22
-ispell-francais 24 0 21
-ispell-rus 24 0 21
itcl 10 0 60
jed 16 0 14
jed-common 0 0 0
@@ -454,23 +452,8 @@ mailx 92 92 92
make 50 0 94
MAKEDEV 91 91 91
mandrake_desk 88 0 88
-mandrake_doc-es 16 0 16
-mandrake_doc-fr 16 0 16
-mandrake_doc-de 16 0 16
-mandrake_doc-en 16 0 16
-mandrake_doc-it 16 0 16
-mandrake_doc-ru 16 0 16
MandrakeUpdate 82 80 80
man-pages 90 0 72
-man-pages-cs 20 0 20
-man-pages-de 20 0 20
-man-pages-es 20 0 20
-man-pages-fr 20 0 20
-man-pages-it 20 0 20
-man-pages-ja 20 0 20
-man-pages-ko 20 0 20
-man-pages-pl 20 0 20
-man-pages-ru 20 0 20
mars-nwe 0 6 0
mawk 0 0 80
mc 49 0 31
@@ -516,7 +499,9 @@ ncurses-devel 10 0 80
netcfg 2 9 2
netkit-base 82 99 82
netscape-communicator 78 60 73
-netscape-francais 7 0 2
+netscape-francais -13 -30 -18
+netscape-castellano -13 -30 -18
+netscape-walon -13 -30 -18
netscape-navigator 50 0 54
newt 10 0 75
newt-devel 10 0 75
@@ -534,13 +519,14 @@ pam 7 99 91
patch 14 0 72
pciutils 16 0 14
pdksh 10 0 9
-perl 0 99 90
+perl 0 19 90
perlftlib 10 0 0
perl-GTK 10 0 72
-perl-MD5 10 99 75
+perl-MD5 10 59 75
perl-Parse-RecDescent 10 0 75
perl-PDL 10 0 75
-pidentd 15 99 87
+perl-Term-Readline-Gnu 10 10 77
+pidentd 15 69 87
pilot-link 40 0 27
pilot-link-devel 11 0 25
pine 40 0 27
@@ -707,6 +693,7 @@ words 47 0 42
wu-ftpd 25 99 22
X11R6-contrib 55 0 47
x3270 1 0 0
+xa+cv -10 -20 -10
xanim 58 0 54
Xaw3d 20 0 70
Xaw3d-devel 10 0 60
@@ -716,6 +703,7 @@ xboard 54 0 48
xboing 53 0 47
xcdroast 59 0 53
xchat 58 0 52
+xcin -10 -10 -10
Xconfigurator 0 0 0
xcpustate 53 0 47
xdaliclock 57 0 51
@@ -742,13 +730,6 @@ XFree86-cyrillic-fonts 25 0 29
XFree86-devel 12 0 55
XFree86-doc 35 0 30
XFree86-FBDev 11 0 9
-XFree86-ISO8859-2 25 0 49
-XFree86-ISO8859-2-100dpi-fonts 25 0 49
-XFree86-ISO8859-2-75dpi-fonts 25 0 49
-XFree86-ISO8859-2-Type1-fonts 25 0 49
-XFree86-ISO8859-9 25 0 49
-XFree86-ISO8859-9-100dpi-fonts 25 0 49
-XFree86-ISO8859-9-75dpi-fonts 25 0 49
XFree86-libs 10 0 0
XFree86-Mach64 0 0 0
XFree86-VGA16 0 0 0
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index a5cb8f849..c6bc7a72f 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -38,6 +38,7 @@ sub write($$$) {
my %l2t = (
'Brezhoneg (Brittany)' => 'Europe/Paris',
+'Chinese (China)' => '',
'Danish (Denmark)' => 'Europe/Copenhagen',
'English (USA)' => 'America/New_York',
'English (UK)' => 'Europe/London',
@@ -54,7 +55,8 @@ my %l2t = (
'Italian (San Marino)' => 'Europe/San_Marino',
'Italian (Vatican)' => 'Europe/Vatican',
'Italian (Switzerland)' => 'Europe/Zurich',
-'Japanese' => 'Asia/Tokyo',
+'Japanese (Japon)' => 'Asia/Tokyo',
+'Korean (Korea)' => 'Asia/Seoul',
'Latvian (Latvia)' => 'Europe/Riga',
'Lithuanian (Lithuania)' => 'Europe/Vilnius',
'Norwegian (Bokmaal)' => 'Europe/Oslo',