From cc134c0d627b3bcf3d60867aa4012a643b756679 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Oct 2007 15:11:19 +0000 Subject: - fix configuring kdeglobals (was broken because of /etc/kderc using udpate-alternatives which use absolute symlinks) --- perl-install/common.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'perl-install/common.pm') 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); -- cgit v1.2.1