summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-09 08:23:57 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-09 08:23:57 +0000
commit2b945c8178c4ae57d592c199a24f09ff7e0812ec (patch)
treefbb0c4a85487cfed78376a6778fb4e164dffd281 /perl-install/pkgs.pm
parent08a1b5b9a132bab1d360d14b1a78815261bcb7a0 (diff)
downloaddrakx-backup-do-not-use-2b945c8178c4ae57d592c199a24f09ff7e0812ec.tar
drakx-backup-do-not-use-2b945c8178c4ae57d592c199a24f09ff7e0812ec.tar.gz
drakx-backup-do-not-use-2b945c8178c4ae57d592c199a24f09ff7e0812ec.tar.bz2
drakx-backup-do-not-use-2b945c8178c4ae57d592c199a24f09ff7e0812ec.tar.xz
drakx-backup-do-not-use-2b945c8178c4ae57d592c199a24f09ff7e0812ec.zip
*** empty log message ***
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0ad16d1b0..22256af4e 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -34,7 +34,7 @@ sub select($$;$) {
my $n = shift @l;
$n =~ /|/ and $n = first(split '\|', $n); #TODO better handling of choice
my $i = Package($packages, $n);
- $i->{base} = $base;
+ $i->{base} ||= $base;
$i->{deps} or log::l("missing deps for $n");
push @l, @{$i->{deps} || []} unless $i->{selected};
$i->{selected}++ unless $i->{selected} == -1;
@@ -42,6 +42,7 @@ sub select($$;$) {
}
sub unselect($$) {
my ($packages, $p) = @_;
+ $p->{base} and return;
my $set = set_new($p->{name});
my $l = $set->{list};
@@ -57,7 +58,7 @@ sub unselect($$) {
my $n = shift @$l;
my $i = Package($packages, $n);
- $i->{selected} <= 0 and next;
+ $i->{selected} <= 0 || $i->{base} and next;
if (--$i->{selected} == 0) {
push @$l, @{$i->{deps} || []};
}
@@ -121,6 +122,7 @@ sub getDeps($) {
open F, install_any::imageGetFile("depslist") or die "can't find dependencies list";
foreach (<F>) {
my ($name, $size, @deps) = split;
+ $packages->{$name} or next;
$packages->{$name}->{size} = $size;
$packages->{$name}->{deps} = \@deps;
map { push @{$packages->{$_}->{provides}}, $name } @deps;
@@ -160,6 +162,7 @@ sub setCompssSelected($$$) {
my $L = uc $l;
my $verif_lang = sub {
+ local $SIG{__DIE__} = 'none';
$_[0] =~ /-([^-]*)$/;
$1 eq $ENV{LANG} || eval { lang::text2lang($1) eq $ENV{LANG} } && !$@;
};
@@ -252,6 +255,7 @@ sub install {
my ($total, $nb);
foreach my $p (@$toInstall) {
+ $p->{installed} = 1;
c::rpmtransAddPackage($trans, getHeader($p), $p->{file}, $isUpgrade);
$nb++;
$total += $p->{size};