summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog12
-rw-r--r--perl-install/Makefile1
-rw-r--r--perl-install/commands.pm7
-rw-r--r--perl-install/keyboard.pm4
-rw-r--r--perl-install/lang.pm23
5 files changed, 29 insertions, 18 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 043cfbd84..ea9a033e8 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,15 @@
+2000-02-10 François Pons <fpons@mandrakesoft.com>
+ * heavy modification of build_archive and extract_archive to manage
+ a TOC directly in archive file, handle bzip2 or gzip compression,
+ extract_archive can extract multiple files a time, with minimal
+ invocation of uncompress program and follow symlink and expand
+ directory contents.
+ * use build_archive/extract_archive for locales.
+ * fixed a min/max in install_steps_gtk for Resize/Create partition.
+ * fixed adjustEnd with dos partition table, take care of magic 63
+ sectors at beginning of partitions, a more solid method should be
+ used for that.
+
2000-02-10 Pixel <pixel@mandrakesoft.com>
* modules.pm (load_thiskind): skip modules "unknown" and "ignore"
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 9507b36a5..62f5dd7fe 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -121,7 +121,6 @@ endif
if [ -f "../modules/modules.cz2" ]; then \
cp -f ../modules/modules.cz2 $(DEST)/lib/; \
- cp -f ../modules/modules.cz2.pl $(DEST)/lib/; \
else \
cp -f ../modules/modules.cpio.bz2 $(DEST)/lib/; \
install -d $(DEST)/lib/modules; \
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 3284354a6..bb3c6e04b 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -415,7 +415,7 @@ sub insmod {
unless (-r ($f = "/lib/modules/$_.o")) {
$f = "/tmp/$_.o";
if (-e "/lib/modules.cz2") {
- run_program::run("extract_archive /lib/modules /tmp $_.o");
+ run_program::run("extract_archive /lib/modules.cz2 /tmp $_.o");
} elsif (-e "/lib/modules.cpio.bz2") {
run_program::run("cd /tmp ; bzip2 -cd /lib/modules.cpio.bz2 | cpio -i $_.o");
} else {
@@ -533,12 +533,9 @@ sub du {
print &$f($_) >> 1, "\t$_\n" foreach @_ ? @_ : glob_("*");
}
-#my %cached_failed_install_cpio;
-#- double space between sub and install_cpio cuz install_cpio is not a shell command
sub install_cpio($$;@) {
my ($dir, $name, @more) = @_;
-# return if $cached_failed_install_cpio{"$dir $name"};
return "$dir/$name" if -e "$dir/$name";
my $cpio = "$dir.cpio.bz2";
@@ -551,8 +548,6 @@ sub install_cpio($$;@) {
my $more = join " ", map { $_ && "$_ $_/*" } @more;
run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/* $more");
- #- not found, cache result
-# return if $cached_failed_install_cpio{"$dir $name"} = ! -e "$dir/$name";
"$dir/$name";
}
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index ff0468fec..57da2fe96 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -203,7 +203,7 @@ sub xmodmap_file {
my ($keyboard) = @_;
my $f = "/usr/share/xmodmap/xmodmap.$keyboard";
if (! -e $f) {
- run_program::run("extract_archive", "/usr/share/xmodmap", '/tmp', "xmodmap.$keyboard");
+ run_program::run("extract_archive", "/usr/share/xmodmap.cz2", '/tmp', "xmodmap.$keyboard");
$f = "/tmp/xmodmap.$keyboard";
}
$f;
@@ -218,7 +218,7 @@ sub setup($) {
load(cat_($f));
} else {
local *F;
- open F, "extract_archive /usr/share/keymaps '' $o->[1].kmap |";
+ open F, "extract_archive /usr/share/keymaps.cz2 '' $o->[1].kmap |";
local $/ = undef;
eval { load(<F>) };
}
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 6ceabf918..aa7087390 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -203,24 +203,30 @@ sub set {
my ($lang, $langs) = @_;
if ($lang) {
+ #- use extract_archive that follow symlinks and expand directory.
+ #- it is necessary as there is a lot of symlinks inside locale.cz2,
+ #- using a compressed cpio archive is nighmare to extract all files.
+ #- reset locale environment variable to avoid any warnings by perl,
+ #- so installation of new locale is done with empty locale ...
+ unless (-e "/usr/share/locale/".$languages{$lang}[2]) {
+ @ENV{qw(LANG LC_ALL LANGUAGE LINGUAS)} = ();
+
+ eval { commands::rm("-r", "/usr/share/locale") };
+ require 'run_program.pm';
+ run_program::run("extract_archive", "/usr/share/locale.cz2", '/usr/share/locale', $languages{$lang}[2]);
+ }
+
$ENV{LC_ALL} = $lang;
$ENV{LANG} = $languages{$lang}[2];
$ENV{LANGUAGE} = $languages{$lang}[3];
#- apparently autoconf/automake doesn't like LINGUAS having a list of values
#- $ENV{LINGUAS} = $languages{$lang}[3];
set_langs($langs || [$lang]);
-
- local $_ = $languages{$lang}[1];
- s/iso-8859-1$/iso-8859-15/;
- s/iso-/iso/;
- s/koi8-.*/koi8/;
- s/cp1251/mscp1251/;
-
- commands::install_cpio("/usr/share/locale", $languages{$lang}[2], "misc", $_);
} else {
# stick with the default (English) */
delete $ENV{LANG};
delete $ENV{LC_ALL};
+ delete $ENV{LINGUAGE};
delete $ENV{LINGUAS};
delete $ENV{RPM_INSTALL_LANG};
}
@@ -283,7 +289,6 @@ sub load_po($) {
open F, "bzip2 -dc $f 2>/dev/null |";
} else {
-e ($f = "$_/po.cz2") and last foreach @INC;
- $f =~ s/\.cz2//;
log::l("trying to load $lang.po from $f");
open F, "extract_archive $f '' $lang.po 2>/dev/null |";
}