summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/common.pm3
-rw-r--r--perl-install/install2.pm8
-rw-r--r--perl-install/install_any.pm15
-rw-r--r--perl-install/pkgs.pm5
-rw-r--r--perl-install/share/list1
5 files changed, 18 insertions, 14 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index d30906a21..baef6befa 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- common => [ qw(__ min max sum sign product bool bool2text to_int ikeys member divide is_empty_array_ref add2hash set_new set_add round_up round_down first second top uniq translate untranslate warp_text) ],
+ common => [ qw(__ min max sum sign product bool listlength bool2text to_int ikeys member divide is_empty_array_ref add2hash set_new set_add round_up round_down first second top uniq translate untranslate warp_text) ],
functional => [ qw(fold_left map_index map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
file => [ qw(dirname basename touch all glob_ cat_ chop_ mode) ],
system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ crypt_ getVarsFromSh setVarsInSh) ],
@@ -53,6 +53,7 @@ sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 }
sub dirname { @_ == 1 or die "usage: dirname <name>\n"; local $_ = shift; s|[^/]*/*\s*$||; s|(.)/*$|$1|; $_ || '.' }
sub basename { @_ == 1 or die "usage: basename <name>\n"; local $_ = shift; s|/*\s*$||; s|.*/||; $_ }
sub bool { $_[0] ? 1 : 0 }
+sub listlength { scalar @_ }
sub bool2text { $_[0] ? "true" : "false" }
sub strcpy { substr($_[0], $_[2] || 0, length $_[1]) = $_[1] }
sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l }
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index d718467fc..098b6a1fd 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -247,7 +247,7 @@ my %suggestedPartitions = (
#-if you want to do a kickstart file, you just have to add all the required fields (see for example
#-the variable $default)
#-#######################################################################################
-$o = {
+$o = $::o = {
bootloader => { onmbr => 1, linear => 0 },
autoSCSI => 0,
mkbootdisk => 1, #- no mkbootdisk if 0 or undef, find a floppy with 1
@@ -587,12 +587,6 @@ sub main {
modules::read_already_loaded();
modparm::read_modparm_file(($::testing ? "/tmp" : "/usr/share") . "/modparm.lst");
- if ($o->{method} && $o->{method} eq "ftp") {
- require 'ftp.pm';
- local $^W = 0;
- *install_any::getFile = \&ftp::getFile;
- }
-
#-the main cycle
my $clicked = 0;
MAIN: for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) {
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e40c800fe..2ebb6e868 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -31,9 +31,18 @@ sub relGetFile($) {
s/i386/i586/;
$_;
}
-sub getFile($) {
- open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return;
- \*getFile;
+sub getFile($) {
+ local $^W = 0;
+ if ($::o->{method} && $::o->{method} eq "ftp") {
+ require 'ftp.pm';
+ *install_any::getFile = \&ftp::getFile;
+ } else {
+ *install_any::getFile = sub($) {
+ open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return;
+ \*getFile;
+ };
+ }
+ goto &getFile;
}
sub versionString {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c14b8ebc1..d5330809b 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -48,7 +48,6 @@ sub unselect($$;$) {
$i->{selected} = 1; #- that way, its counter will be zero the first time
set_add($set, @{$i->{provides} || []});
}
-
while (@$l) {
my $n = shift @$l;
my $i = Package($packages, $n);
@@ -58,7 +57,7 @@ sub unselect($$;$) {
push @$l, @{$i->{deps} || []} if !$size || ($size -= $i->{size}) > 0;
}
}
- return if $size <= 0;
+ return if defined $size && $size <= 0;
#- garbage collect for circular dependencies
my $changed = 1;
@@ -275,7 +274,7 @@ sub install {
my ($total, $nb);
foreach my $p (@$toInstall) {
- getHeader($p) or next;
+ eval { getHeader($p) }; $@ and next;
$p->{installed} = 1;
$p->{file} ||= sprintf "%s-%s-%s.%s.rpm",
$p->{name}, $p->{version}, $p->{release},
diff --git a/perl-install/share/list b/perl-install/share/list
index a163f61c6..4aa44e59f 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -82,3 +82,4 @@
/usr/share/fonts/ISO8859-9/75dpi/fonts.alias
/usr/share/fonts/ISO8859-9/75dpi/tr_helvR08.pcf.gz
/usr/share/fonts/ISO8859-9/75dpi/tr_helvR10.pcf.gz
+/usr/sbin/ext2resize