summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-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 {