diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-08-25 16:31:24 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-08-25 16:31:24 +0000 |
commit | aaac324afdf01fa17b077040b283fc58ee6f8328 (patch) | |
tree | e46b5d20d093555ae9fdb2aff674a1487e398dbc /perl-install | |
parent | 4e915a66b1d826e7b9407ff1c25dd3889be5c220 (diff) | |
download | drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.gz drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.bz2 drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.xz drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.zip |
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/common.pm | 15 | ||||
-rw-r--r-- | perl-install/devices.pm | 14 | ||||
-rw-r--r-- | perl-install/install2.pm | 2 | ||||
-rw-r--r-- | perl-install/lang.pm | 2 | ||||
-rw-r--r-- | perl-install/log.pm | 4 | ||||
-rw-r--r-- | perl-install/share/po/Makefile | 2 | ||||
-rw-r--r-- | perl-install/swap.pm | 2 |
7 files changed, 19 insertions, 22 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index e1b44ac2d..4578b61c9 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -181,14 +181,15 @@ sub unmakedev { $_[0] >> 8, $_[0] & 0xff } sub translate { my ($s) = @_; - unless (defined %po::I18N::I18N) { - if (my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2)) { - local $@; - local $SIG{__DIE__} = 'none'; - eval { require "po/$lang.pm" }; - } + my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2); + unless (defined $po::I18N::{$lang}) { + local $@; + local $SIG{__DIE__} = 'none'; + eval { require "po/$lang.pm"; }; } - $po::I18N::I18N{$s} || $s; + $po::I18N::{$lang} or return $s; + my $l = *{$po::I18N::{$lang}}; + $l->{$s} || $s; } sub untranslate($@) { diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 7932eb21b..8190096d2 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -40,15 +40,13 @@ sub make($) { my ($type, $major, $minor); my $prefix = ''; - if (m,^(.*)/(dev|tmp)/(.*),) { - $prefix = $1; - $_ = $3; - } elsif (m,/,) { - die "can't make device $file"; + if (m,^(.*/(?:dev|tmp))/(.*),) { + $_ = $2; + } else { + $file = "$prefix/dev/$_"; + -e $file or $file = "$prefix/tmp/$_"; } - $file = "$prefix/dev/$_"; - -e $file or $file = "$prefix/tmp/$_"; - -e $file and return $file; # assume nobody takes fun at creating files named as device + -e $file and return $file; # assume nobody takes fun at creating files named as device if (/^sd(.)(\d{0,2})/) { $type = c::S_IFBLK(); diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 457b5bf83..f76e27a67 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -154,7 +154,7 @@ my $default = { autoSCSI => 0, mkbootdisk => 0, packages => [ qw() ], - partitionning => { clearall => $::testing, eraseBadPartitions => 1, auto_allocate => 0, autoformat => 1 }, + partitionning => { clearall => $::testing, eraseBadPartitions => 1, auto_allocate => 0, autoformat => 0 }, partitions => [ { mntpoint => "/boot", size => 16 << 11, type => 0x83 }, { mntpoint => "/", size => 300 << 11, type => 0x83 }, diff --git a/perl-install/lang.pm b/perl-install/lang.pm index aa0bd78a2..9a30749a7 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -41,8 +41,6 @@ sub text2lang { sub set { my $lang = shift; - undef %po::I18N::I18N; - if ($lang) { $ENV{LANG} = $ENV{LINGUAS} = $lang; $ENV{LC_ALL} = $languages{$lang}[3]; diff --git a/perl-install/log.pm b/perl-install/log.pm index 00148127a..cab808f5e 100644 --- a/perl-install/log.pm +++ b/perl-install/log.pm @@ -12,8 +12,8 @@ sub fd() { fileno LOG } sub l { $logOpen or openLog(); - print LOG "* ", @_, "\n"; - print LOG2 "* ", @_, "\n"; + print LOG "* ", @_, "\n"; + print LOG2 "* ", @_, "\n"; } sub ld { $logDebugMessages and &l } sub w { &l } diff --git a/perl-install/share/po/Makefile b/perl-install/share/po/Makefile index c41539779..0ea2c8d82 100644 --- a/perl-install/share/po/Makefile +++ b/perl-install/share/po/Makefile @@ -9,7 +9,7 @@ clean: rm -f empty.po $(FROMPOFILES) $(POFILES:%=%t) $(PMSCFILES) $(FROMPOFILES): %.pm: %.po - ./po2perl < $< > $@ + ./po2perl $< > $@ $(POFILES): panoramix.pot cp -f $@ $@t diff --git a/perl-install/swap.pm b/perl-install/swap.pm index 4f9fcf1f3..879794ca9 100644 --- a/perl-install/swap.pm +++ b/perl-install/swap.pm @@ -68,7 +68,7 @@ sub make($;$) { my $nbpages = divide(devices::size($devicename), $pagesize); - if ($nbpages <= $V0_MAX_PAGES || kernel_greater_or_equal(2,1,117) || $pagesize < 2048) { + if ($nbpages <= $V0_MAX_PAGES || !kernel_greater_or_equal(2,1,117) || $pagesize < 2048) { $version = 0; } else { $version = 1; |