summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-03-07 13:06:10 +0000
committerFrancois Pons <fpons@mandriva.com>2000-03-07 13:06:10 +0000
commit26f5c1cfb24bff40293d312c04572ab38a0148a0 (patch)
tree91a6ad9428736e5f763f7c92fd25544e96b4bce7
parent51cbb8aad9b16ac231d4902568d7a63847cb996c (diff)
downloaddrakx-backup-do-not-use-26f5c1cfb24bff40293d312c04572ab38a0148a0.tar
drakx-backup-do-not-use-26f5c1cfb24bff40293d312c04572ab38a0148a0.tar.gz
drakx-backup-do-not-use-26f5c1cfb24bff40293d312c04572ab38a0148a0.tar.bz2
drakx-backup-do-not-use-26f5c1cfb24bff40293d312c04572ab38a0148a0.tar.xz
drakx-backup-do-not-use-26f5c1cfb24bff40293d312c04572ab38a0148a0.zip
*** empty log message ***
-rw-r--r--perl-install/install2.pm18
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/pkgs.pm6
3 files changed, 10 insertions, 16 deletions
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);
};