summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/common.pm15
2 files changed, 3 insertions, 14 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 7ab389dae..1b456bf5b 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- for XFdrake: use update-alternatives command instead doing things by hand
+ (this uses --set, new feature of update-alternatives) (#32362)
- harddrake:
o display the PCI domain too
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 {