From 06891dce276c6a2263baa1fd342b485ae95c742b Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 12 Sep 2002 14:57:18 +0000 Subject: added code after install of package to fix broken alternatives. --- perl-install/install_steps.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 357600b6a..4439473f4 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -499,6 +499,17 @@ GridHeight=70 } } + #- fix bad update-alternatives that may occurs after upgrade (but let them for install too). + if (-d "$o->{prefix}/etc/alternatives") { + local (*ALTERNATE_DIR, $_); opendir ALTERNATE_DIR, "$o->{prefix}/etc/alternatives"; + while (defined($_ = readdir ALTERNATE_DIR)) { + -e "$o->{prefix}/etc/alternatives/$_" and next; + log::l("fixing broken alternative $_"); + run_program::rooted($o->{prefix}, "update-alternatives", "--auto", $_); + } + closedir ALTERNATE_DIR; + } + #- update oem lilo image if it exists. if (-s "/boot/oem-message-graphic") { rename "$o->{prefix}/boot/message-graphic", "$o->{prefix}/boot/message-graphic.mdkgiorig"; -- cgit v1.2.1