summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-05 08:55:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-05 08:55:59 +0000
commit83f00ab2b7a1d2a4cc1d800fb1f7f98e2bc56e1c (patch)
tree67082b1f4bec8938b561ab1ab65d613e74a3f4e0 /perl-install/any.pm
parent1922fb769aa3deb26f7f5b6fcb14784a5ba9a0f3 (diff)
downloaddrakx-83f00ab2b7a1d2a4cc1d800fb1f7f98e2bc56e1c.tar
drakx-83f00ab2b7a1d2a4cc1d800fb1f7f98e2bc56e1c.tar.gz
drakx-83f00ab2b7a1d2a4cc1d800fb1f7f98e2bc56e1c.tar.bz2
drakx-83f00ab2b7a1d2a4cc1d800fb1f7f98e2bc56e1c.tar.xz
drakx-83f00ab2b7a1d2a4cc1d800fb1f7f98e2bc56e1c.zip
basic code for upgrading from a redhat distribution
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 454b6fa02..a9b099947 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -826,13 +826,18 @@ UNREGISTER ^$devfs_if\$ EXECUTE /etc/dynamic/scripts/rawdevice.script del /dev/$
");
}
-sub fix_broken_alternatives() {
+sub fix_broken_alternatives {
+ my ($force_default) = @_;
#- fix bad update-alternatives that may occurs after upgrade (and sometimes for install too).
-d "$::prefix/etc/alternatives" or return;
foreach (all("$::prefix/etc/alternatives")) {
- next if run_program::rooted($::prefix, 'test', '-e', "/etc/alternatives/$_");
- log::l("fixing broken alternative $_");
+ if ($force_default) {
+ log::l("setting alternative $_");
+ } else {
+ next if run_program::rooted($::prefix, 'test', '-e', "/etc/alternatives/$_");
+ log::l("fixing broken alternative $_");
+ }
run_program::rooted($::prefix, 'update-alternatives', '--auto', $_);
}
}