summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-09-19 14:43:24 +0000
committerFrancois Pons <fpons@mandriva.com>2002-09-19 14:43:24 +0000
commitc13045101d2b3065aeb5bfc393d258aeeae503bf (patch)
tree9f8da5f6fced3db6b18686cbd815043d1f5f7cf3 /perl-install/pkgs.pm
parentfeee84d3ce4127b26fa8e86479c7342ba82d31c0 (diff)
downloaddrakx-backup-do-not-use-c13045101d2b3065aeb5bfc393d258aeeae503bf.tar
drakx-backup-do-not-use-c13045101d2b3065aeb5bfc393d258aeeae503bf.tar.gz
drakx-backup-do-not-use-c13045101d2b3065aeb5bfc393d258aeeae503bf.tar.bz2
drakx-backup-do-not-use-c13045101d2b3065aeb5bfc393d258aeeae503bf.tar.xz
drakx-backup-do-not-use-c13045101d2b3065aeb5bfc393d258aeeae503bf.zip
try to avoid infinite loop on error to install package.
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c1239dd78..2ec14c135 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -1066,6 +1066,7 @@ sub install($$$;$$) {
$retry_pkg = shift @transToInstall;
$retry_count = 3;
} else {
+ my $name;
if (!$retry_pkg->flag_installed && packageMedium($packages, $retry_pkg)->{selected} && !exists($ignoreBadPkg{$retry_pkg->name})) {
if ($retry_count) {
log::l("retrying installing package ".$retry_pkg->fullname." alone in a transaction");
@@ -1074,10 +1075,17 @@ sub install($$$;$$) {
log::l("bad package ". $retry_pkg->fullname ." unable to be installed");
$retry_pkg->set_flag_requested(0);
$retry_pkg->set_flag_required(0);
- cdie ("error installing package list: ". $retry_pkg->fullname);
+ #- keep name to display (problem of displaying ?).
+ $name = $retry_pkg->fullname;
+ $retry_pkg->free_header;
+ $retry_pkg = shift @transToInstall;
+ $retry_count = 3;
+ #- now it could be safe to display error message ?
+ cdie ("error installing package list: $name");
}
}
- if ($retry_pkg->flag_installed || !$retry_pkg->flag_selected) {
+ #- check if name has been set (so that the following code has been executed already).
+ if (!$name && ($retry_pkg->flag_installed || !$retry_pkg->flag_selected)) {
$retry_pkg->free_header;
$retry_pkg = shift @transToInstall;
$retry_count = 3;