summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-16 12:56:11 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-16 12:56:11 +0000
commit332c83cda4148f3f034d8b3ff5538ea72bd32a35 (patch)
treeba5a0d66ef415d7974b1f4610c707eae28e8257e /perl-install
parentb4955db27bf8703e7088da788a9f15c0c96ae2a4 (diff)
downloaddrakx-332c83cda4148f3f034d8b3ff5538ea72bd32a35.tar
drakx-332c83cda4148f3f034d8b3ff5538ea72bd32a35.tar.gz
drakx-332c83cda4148f3f034d8b3ff5538ea72bd32a35.tar.bz2
drakx-332c83cda4148f3f034d8b3ff5538ea72bd32a35.tar.xz
drakx-332c83cda4148f3f034d8b3ff5538ea72bd32a35.zip
fixed test of alternatives always seen as broken.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_steps.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 2434d4c42..1b7002500 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -503,7 +503,8 @@ GridHeight=70
#- fix bad update-alternatives that may occurs after upgrade (but let them for install too).
if (-d "$o->{prefix}/etc/alternatives") {
foreach (all("$o->{prefix}/etc/alternatives")) {
- -e "$o->{prefix}/etc/alternatives/$_" and next;
+ my $l = readlink "$o->{prefix}/etc/alternatives/$_";
+ -e ($l =~ m|^/| ? "$o->{prefix}$l" : "$o->{prefix}/etc/alternatives/$_") and next;
log::l("fixing broken alternative $_");
run_program::rooted($o->{prefix}, "update-alternatives", "--auto", $_);
}