diff options
-rw-r--r-- | perl-install/common.pm | 15 | ||||
-rw-r--r-- | perl-install/install/NEWS | 3 | ||||
-rw-r--r-- | perl-install/lang.pm | 8 |
3 files changed, 24 insertions, 2 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index a249f72b7..6bcd0889e 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -164,6 +164,21 @@ sub formatTime { } } +sub expand_symlinks_with_absolute_symlinks_in_prefix { + my ($prefix, $link) = @_; + + my ($first, @l) = split '/', $link; + $first eq '' or die "expand_symlinks: $link is relative\n"; + my ($f, $l); + foreach (@l) { + $f .= "/$_"; + while ($l = readlink "$prefix$f") { + $f = $l =~ m!^/! ? $l : MDK::Common::File::concat_symlink($f, "../$l"); + } + } + "$prefix$f"; +} + sub expand_symlinks_but_simple { my ($f) = @_; my $link = readlink($f); diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 0a7121cf3..2be66d32c 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- fix configuring kdeglobals (was broken because of /etc/kderc using + udpate-alternatives which use absolute symlinks) + Version 10.4.233 - 4 October 2007, by Pascal "Pixel" Rigaux - use /dev/cdrom in fstab, but do not write corresponding udev rule diff --git a/perl-install/lang.pm b/perl-install/lang.pm index e33d9ac95..fbe28b1f4 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -1134,8 +1134,12 @@ sub write { )); eval { - my %dir_defaults = read_gnomekderc("$::prefix/etc/kderc", 'Directories-default'); - my $confdir = $::prefix . ($b_user_only ? "$ENV{HOME}/.kde" : first(split(',', $dir_defaults{prefixes})) || "/etc/kde") . '/share/config'; + my $confdir = $::prefix . ($b_user_only ? "$ENV{HOME}/.kde" : do { + my $kderc = $::prefix ? common::expand_symlinks_with_absolute_symlinks_in_prefix($::prefix, '/etc/kderc') : '/etc/kderc'; + log::l("reading $kderc"); + my %dir_defaults = read_gnomekderc($kderc, 'Directories-default'); + first(split(',', $dir_defaults{prefixes})) || "/etc/kde" + }) . '/share/config'; -d $confdir or die 'not configuring kde config files since it is not installed/used'; |