summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
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", $_);
}