diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-13 10:02:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-13 10:06:49 +0100 |
commit | 85d584416fd7d51a397807597b5f36e39820a317 (patch) | |
tree | c690303213f0ba08e7490e977dc5ea439bcaf7b8 /solenv | |
parent | e667062310ed327dc0a9d338a9e26dc0e2ce865f (diff) |
installer: use 'mkdir -p' before 'ln -sf'
Fixes the "ln: failed to create symbolic link
'.../usr/lib/libreoffice/sdk/classes/win/unowinreg.dll': No such file or
directory" problem, reported at
http://lists.freedesktop.org/archives/libreoffice/2013-November/057443.html
Change-Id: Ibe7dbbecc670921ca3c372cc9b8655cf2f50aefa
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/worker.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm index 917066f4f784..aab676f9a086 100644 --- a/solenv/bin/modules/installer/worker.pm +++ b/solenv/bin/modules/installer/worker.pm @@ -23,6 +23,7 @@ use File::Copy; use File::stat; use File::Temp qw(tmpnam); use File::Path; +use File::Basename; use installer::control; use installer::converter; use installer::exiter; @@ -369,7 +370,9 @@ sub install_simple ($$$$$$) my $onelink = ${$unixlinksarray}[$i]; my $target = $onelink->{'Target'}; my $destination = $onelink->{'destination'}; - my $cmd = "ln -sf '$target' '$destdir$destination'"; + my $cmd = "mkdir -p '" . dirname($destdir . $destination) . "'"; + system($cmd) && die "Failed to execute \"$cmd\""; + $cmd = "ln -sf '$target' '$destdir$destination'"; system($cmd) && die "Failed \"$cmd\""; push @lines, "$destination\n"; |