summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
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);