From 26f5c1cfb24bff40293d312c04572ab38a0148a0 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 7 Mar 2000 13:06:10 +0000 Subject: *** empty log message *** --- perl-install/install2.pm | 18 +++++------------- perl-install/install_any.pm | 2 +- perl-install/pkgs.pm | 6 ++++-- 3 files changed, 10 insertions(+), 16 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 4bb38d9aa..bc00a3e6e 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -354,26 +354,22 @@ sub formatPartitions { #------------------------------------------------------------------------------ sub choosePackages { require pkgs; - print "a\n"; $o->setPackages if $_[1] == 1; - print "b\n"; $o->selectPackagesToUpgrade($o) if $o->{isUpgrade} && $_[1] == 1; - print "c\n"; if ($_[1] > 1 || !$o->{isUpgrade} || $::expert) { if ($_[1] == 1) { $o->{compssUsersChoice}{$_} = 1 foreach @{$o->{compssUsersSorted}}, 'Miscellaneous'; $o->{compssUsersChoice}{KDE} = 0 if $o->{lang} =~ /ja|el|ko|th|vi|zh/; #- gnome handles much this fonts much better } - print "d\n"; $o->choosePackages($o->{packages}, $o->{compss}, $o->{compssUsers}, $o->{compssUsersSorted}, $_[1] == 1); - print "e\n"; my $pkg = pkgs::packageByName($o->{packages}, 'kdesu'); - print "f\n"; pkgs::unselectPackage($o->{packages}, $pkg) if $pkg && $o->{security} > 3; - print "g\n"; - pkgs::packageSetFlagSelected(pkgs::packageByName($o->{packages}, $_), 1) foreach @{$o->{base}}; #- already done by selectPackagesToUpgrade. - print "h\n"; + + #- check pre-condition where base backage has to be selected. + foreach (@{$o->{base}}) { + pkgs::packageFlagSelected(pkgs::packageByName($o->{packages}, $_)) or die "base package not selected"; + } } } @@ -381,13 +377,9 @@ sub choosePackages { sub doInstallStep { $o->readBootloaderConfigBeforeInstall if $_[1] == 1; - print "i\n"; $o->beforeInstallPackages; - print "j\n"; $o->installPackages($o->{packages}); - print "k\n"; $o->afterInstallPackages; - print "l\n"; } #------------------------------------------------------------------------------ sub miscellaneous { diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 248dc5b69..716789238 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -122,7 +122,7 @@ sub setPackages($) { my ($o) = @_; require pkgs; - if (is_empty_hash_ref($o->{packages})) { + if (is_empty_array_ref($o->{packages})) { $o->{packages} = pkgs::psUsingHdlist($o->{prefix}); push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs"; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index e47b03d65..7987fae7d 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -176,6 +176,9 @@ sub selectPackage($$;$$) { #- do not select in such case. packageFlagInstalled($pkg) and return; + #- make sure base package are set even if already selected. + $base and packageSetFlagBase($pkg, 1); + #- select package and dependancies, otherOnly may be a reference #- to a hash to indicate package that will strictly be selected #- when value is true, may be selected when value is false (this @@ -205,7 +208,6 @@ sub selectPackage($$;$$) { } } } - $base and packageSetFlagBase($pkg, 1); $otherOnly and packageFlagSelected($pkg) and $otherOnly->{packageName($pkg)} = 1; $otherOnly or packageSetFlagSelected($pkg, 1+packageFlagSelected($pkg)); 1; @@ -738,7 +740,7 @@ sub install($$$;$) { c::rpmtransAddPackage($trans, $_->{header}, packageName($_), $isUpgrade && packageName($_) !~ /kernel/) #- TODO: replace `named kernel' by `provides kernel' foreach @transToInstall; - my $close = sub { + my $close = sub { # c::headerFree(delete $_->{header}) foreach @transToInstall; c::rpmtransFree($trans); }; -- cgit v1.2.1