summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-09-12 14:57:18 +0000
committerFrancois Pons <fpons@mandriva.com>2002-09-12 14:57:18 +0000
commit06891dce276c6a2263baa1fd342b485ae95c742b (patch)
treede0060fc089296d1cb8272a3272c7778eb1afd73 /perl-install/install_steps.pm
parent8b2610d12a20cfdc2c59af6718df21503fb0fb0e (diff)
downloaddrakx-06891dce276c6a2263baa1fd342b485ae95c742b.tar
drakx-06891dce276c6a2263baa1fd342b485ae95c742b.tar.gz
drakx-06891dce276c6a2263baa1fd342b485ae95c742b.tar.bz2
drakx-06891dce276c6a2263baa1fd342b485ae95c742b.tar.xz
drakx-06891dce276c6a2263baa1fd342b485ae95c742b.zip
added code after install of package to fix broken alternatives.
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm11
1 files changed, 11 insertions, 0 deletions
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";