summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-10-04 15:11:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-10-04 15:11:19 +0000
commitcc134c0d627b3bcf3d60867aa4012a643b756679 (patch)
tree909a600247265dbfb0e0841df32522cfede70a35 /perl-install/common.pm
parentbc48dff8f55a68b2e5b12d36fdf5e93eded3d2a5 (diff)
downloaddrakx-cc134c0d627b3bcf3d60867aa4012a643b756679.tar
drakx-cc134c0d627b3bcf3d60867aa4012a643b756679.tar.gz
drakx-cc134c0d627b3bcf3d60867aa4012a643b756679.tar.bz2
drakx-cc134c0d627b3bcf3d60867aa4012a643b756679.tar.xz
drakx-cc134c0d627b3bcf3d60867aa4012a643b756679.zip
- fix configuring kdeglobals (was broken because of /etc/kderc using
udpate-alternatives which use absolute symlinks)
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm15
1 files changed, 15 insertions, 0 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);