diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-02-14 12:53:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-02-14 12:53:07 +0000 |
commit | 2761f46c6c45794d0ee7da23af0389f9128f62f4 (patch) | |
tree | 23fd2732f33deda2d6c2611c21a329a905dbde1b | |
parent | e35208e8d6b8b96993d6cbe7c5708e44ebf653f3 (diff) | |
download | drakx-backup-do-not-use-2761f46c6c45794d0ee7da23af0389f9128f62f4.tar drakx-backup-do-not-use-2761f46c6c45794d0ee7da23af0389f9128f62f4.tar.gz drakx-backup-do-not-use-2761f46c6c45794d0ee7da23af0389f9128f62f4.tar.bz2 drakx-backup-do-not-use-2761f46c6c45794d0ee7da23af0389f9128f62f4.tar.xz drakx-backup-do-not-use-2761f46c6c45794d0ee7da23af0389f9128f62f4.zip |
simpler way to detect broken alternatives. It works for symlinks to symlinks,
eg: rvi -> /bin/vi -> /etc/alternatives/vi -> /bin/vim-minimal
-rw-r--r-- | perl-install/install_steps.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 6c9604d7c..4844dc247 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -519,8 +519,7 @@ 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")) { - my $l = readlink "$o->{prefix}/etc/alternatives/$_"; - -e ($l =~ m|^/| ? "$o->{prefix}$l" : "$o->{prefix}/etc/alternatives/$_") and next; + next if run_program::rooted($o->{prefix}, 'test', '-e', "/etc/alternatives/$_"); log::l("fixing broken alternative $_"); run_program::rooted($o->{prefix}, "update-alternatives", "--auto", $_); } |