diff options
author | Mystery Man <unknown@mandriva.org> | 2004-05-11 12:41:07 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2004-05-11 12:41:07 +0000 |
commit | f0b2cf434b3a176276e79046eafc71a26d94ca3d (patch) | |
tree | a2f73175aefefa9f630d80119507e1c95868367e /move/make_live | |
parent | 3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 (diff) | |
download | drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar.gz drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar.bz2 drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar.xz drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.zip |
This commit was manufactured by cvs2svn to create branch
'MDK-10-update'.
Diffstat (limited to 'move/make_live')
-rwxr-xr-x | move/make_live | 66 |
1 files changed, 20 insertions, 46 deletions
diff --git a/move/make_live b/move/make_live index 5a092de09..39dfbb424 100755 --- a/move/make_live +++ b/move/make_live @@ -3,19 +3,21 @@ use lib "../perl-install"; use common; use pkgs; -use lang; + +my @ALLOWED_LANGS = split(' ', first(cat_('move.pm') =~ /ALLOWED_LANGS = qw\((.*)\)/)); +my @langs = map { /^../; $& } @ALLOWED_LANGS; @ARGV <= 1 or die "usage: make_live [live_location=/tmp/live_tree]\n"; my $kernel_version = do { - my @l = glob_('/export/Mandrake/RPMS/kernel-2.6*'); + my @l = glob_('/export/Mandrake/RPMS/kernel-2.*'); @l >= 1 or die "can't find kernel"; @l <= 1 or die "too many kernels"; first(`rpm -qp --qf '%{name}' $l[0]` =~ /kernel-(.*)/); }; sub installPackages { - output_p("$::prefix/etc/rpm/macros", "%_install_langs all\n"); + output_p("$::prefix/etc/rpm/macros", "%_install_langs " . join(":", @langs) . "\n"); rename '/etc/rpm/macros', '/etc/rpm/macros.'; system('cp', "$::prefix/etc/rpm/macros", '/etc/rpm/macros'); @@ -33,10 +35,6 @@ sub installPackages { open(my $F, '/export/' . install_any::relGetFile($f)) or return; $F; }; - - undef *c::kernel_version; - *c::kernel_version = sub { $kernel_version }; - install_any::setPackages(my $o = $::o = { prefix => $::prefix, meta_class => 'desktop', @@ -49,22 +47,11 @@ sub installPackages { qw(mountloop), #- crypted folders qw(dnotify), #- notification of /etc changes qw(mandrake_doc-move-en mandrake_doc-move-fr mandrake_doc-move-drakxtools-en mandrake_doc-move-drakxtools-fr), - qw(synaptics), - #- network conf: - qw(wireless-tools pcmcia-cs), - #- zeroconf: - qw(zcip dhcpcd tmdns), - #- cnx stuff: - qw(dhcp-client ppp kdenetwork-kppp ppp-pppoatm ppp-pppoe pptp-linux pptp-adsl rp-pppoe), - #- ISDN stuff: - qw(isdn4net ibod isdn4k-utils), - #- network file sharing: - qw(nfs-utils-clients samba-client), - #- network drivers and firmwares: - qw(eagle-usb speedtouch speedtouch_mgmt unicorn), + qw(zcip dhcp-client dhcpcd ppp kdenetwork-kppp rp-pppoe pptp-adsl speedtouch speedtouch_mgmt nfs-utils-clients samba-client tmdns wireless-tools adiusbadsl pcmcia-cs), #- network conf qw(cups cups-drivers foomatic-db gimpprint hpoj libnet-snmp mtools mtoolsfm nmap printer-filters printer-testpages printer-utils scli xojpanel xpp), #- printer stuff qw(ATI_GLX NVIDIA_GLX), - qw(hcfpcimodem hsflinmodem ltmodem), + "kernel-smp-$kernel_version", + qw(hcfpcimodem hsflinmodem ltmodem), "NVIDIA_nforce-$kernel_version", qw(xinput), #- for some mice qw(perl-Term-Readline-Gnu binutils emacs-X11 bash-completion), #- allow debugging move qw(openssh-askpass-gnome), #- openssh-askpass for mountloop doesn't allow to click on ok/cancel buttons @@ -77,13 +64,7 @@ sub installPackages { my %compssUsersChoice = map { $_ => 1 } map { @{$_->{flags}} } values %{$o->{compssUsers}}; $compssUsersChoice{$_} = 1 foreach 'SYSTEM', 'DVD', 'USB', 'SOUND', 'BURNER', 'UTF8', 'DOCS', 'TV', '3D', 'INSTALL'; - $compssUsersChoice{qq(LOCALES"$_")} = 1 foreach lang::list_langs(); - - #- we don't want those - foreach (qw(magicdev mdkonline)) { - my $pkg = pkgs::packageByName($o->{packages}, $_) or die "$_ not there anymore"; - $pkg->set_rate(0); - } + $compssUsersChoice{qq(LOCALES"$_")} = 1 foreach @langs; pkgs::setSelectedFromCompssList($o->{packages}, \%compssUsersChoice, 4, 0); @@ -109,16 +90,13 @@ sub config_X_proprietary_drivers { my ($full_name) = run_program::rooted_get_stdout($::prefix, 'rpm', '-ql', $_) =~ m!/usr/lib/(\Q$lib\E\..*)! or die ''; symlinkf($full_name, "$::prefix/usr/lib/$lib.$name_to_Driver{$_}"); } - - #- nvidia's libglx.so is hardwired to the tls version, change this - system("cd $::prefix/usr/X11R6/lib/modules/extensions ; ln -sf libglx.so.* libglx.so"); - #- remove the dirty hack done by NVIDIA_kernel-xxx proprietary package #- we do it by hand when needed substInFile { $_ = '' if /^nvidia$/ } "$::prefix/etc/modules"; } -$::prefix = `make get_dest_livetree`; +my $cwd = chomp_(`pwd`); +$::prefix = $ARGV[0] || '/tmp/live_tree'; print "Making live in $::prefix directory.\n"; eval { fs::umount("$::prefix/proc") }; @@ -134,8 +112,7 @@ run_program::rooted($::prefix, 'fc-cache'); #- generate cache in all directorie #- system -# de-complexify, use the default on any arch -eval { rm_rf("$::prefix$_") } foreach '/lib/i686', '/lib/tls', '/usr/lib/tls', '/usr/X11R6/lib/tls', '/usr/X11R6/lib/modules/extensions/tls'; +eval { rm_rf("$::prefix/lib/i686") }; # de-complexify, use the default on any arch eval { config_X_proprietary_drivers() }; @@ -183,6 +160,8 @@ unlink "$::prefix/usr/X11R6/bin/drakfw"; #- KDE +symlinkf('/etc/X11/ksycoca', "$::prefix/usr/share/services/ksycoca"); + unlink "$::prefix/usr/share/autostart/$_.desktop" foreach 'klipper', 'korgac', 'kalarmd.autostart'; update_gnomekderc("$::prefix/usr/share/config/kdesktoprc", ScreenSaver => (Lock => 'true')); @@ -207,24 +186,19 @@ substInFile { s!/es/Starter.html/!/en/Starter.html/!; } "$::prefix/usr/share/mdk/mandrakegalaxy/mdkgalaxy-es.html"; -{ - local $ENV{LC_ALL} = 'en_US'; #- update-menus doesn't work when there is no locale (aka locale "C") - local $ENV{HOME} = '/'; #- savekdemimetypes.pl needs this otherwise it's tmp file fails - run_program::rooted($::prefix, 'update-menus', '-n'); -} +$ENV{LC_ALL} = 'en_US'; #- update-menus doesn't work when there is no locale (aka locale "C") +run_program::rooted($::prefix, 'update-menus', '-n'); run_program::rooted($::prefix, 'nspluginscan'); #- must be run before kbuildsycoca for the ksycoca to be flash plugin aware $ENV{HELP_BROWSER} = "kfmclient openProfile webbrowsing"; $ENV{BROWSER} = "kfmclient openProfile webbrowsing"; $ENV{DESKTOP} = "kde"; -foreach my $lang (lang::list_langs()) { - local $ENV{LC_ALL} = lang::getLANGUAGE($lang); - unlink "$::prefix/usr/share/services/ksycoca"; - run_program::rooted($::prefix, 'kbuildsycoca', '--global'); - rename("$::prefix/usr/share/services/ksycoca", "$::prefix/usr/share/services/ksycoca-$lang"); +foreach (@ALLOWED_LANGS) { + $ENV{LC_ALL} = $_; + run_program::rooted($::prefix, 'kbuildsycoca'); + cp_af("$::prefix/tmp/kde-root/ksycoca", "$::prefix/usr/share/services/ksycoca-$_"); } -symlinkf('/etc/X11/ksycoca', "$::prefix/usr/share/services/ksycoca"); #- Mandrake |