summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-08 19:15:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-08 19:15:46 +0000
commit2a618e97d42b6b48b7661b1554a8b1dbee6a6a71 (patch)
tree4b7fd18b6582e597be59d476eda0f01b6cfc23b3 /perl-install/common.pm
parentba847292a3c16d45820402776c46f283622decc7 (diff)
downloaddrakx-2a618e97d42b6b48b7661b1554a8b1dbee6a6a71.tar
drakx-2a618e97d42b6b48b7661b1554a8b1dbee6a6a71.tar.gz
drakx-2a618e97d42b6b48b7661b1554a8b1dbee6a6a71.tar.bz2
drakx-2a618e97d42b6b48b7661b1554a8b1dbee6a6a71.tar.xz
drakx-2a618e97d42b6b48b7661b1554a8b1dbee6a6a71.zip
- for XFdrake: use update-alternatives command instead doing things by hand
(this uses --set, new feature of update-alternatives) (#32362)
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm15
1 files changed, 1 insertions, 14 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 5ad572b5b..af15998b0 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -398,20 +398,7 @@ sub get_alternatives {
sub symlinkf_update_alternatives {
my ($name, $wanted_file) = @_;
- my $conf = get_alternatives($name);
- my $chosen = find { $_->{file} eq $wanted_file } @{$conf->{alternatives}} or return;
- symlinkf("/etc/alternatives/$name", $::prefix . $conf->{link});
- symlinkf($wanted_file, "$::prefix/etc/alternatives/$name");
- mapn {
- my ($slave, $file) = @_;
- if ($file) {
- symlinkf("/etc/alternatives/$slave->{name}", $::prefix . $slave->{link});
- symlinkf($file, "$::prefix/etc/alternatives/$slave->{name}");
- } else {
- unlink $::prefix . $slave->{link};
- unlink "$::prefix/etc/alternatives/$slave->{name}";
- }
- } $conf->{slaves}, $chosen->{slave_files};
+ run_program::rooted($::prefix, 'update-alternatives', '--set', $name, $wanted_file);
}
sub update_gnomekderc_no_create {