[Libreoffice-commits] .: solenv/bin
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Nov 8 05:58:05 PST 2010
solenv/bin/modules/installer/worker.pm | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
New commits:
commit 6e3bb5af0e072d4e46c8979f95816eb21a455d07
Author: Surendran Mahendran <surenspost at gmail.com>
Date: Mon Nov 8 13:55:19 2010 +0000
Build script improvement to dev-install target
For every dev-install the install directory in rawbuild had to be removed. This
patch fixes that and consecutive dev-install works without manual intervention.
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 6600dbf..7252c76 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -31,6 +31,7 @@ use Cwd;
use File::Copy;
use File::stat;
use File::Temp qw(tmpnam);
+use File::Path;
use installer::control;
use installer::converter;
use installer::existence;
@@ -793,11 +794,20 @@ sub install_simple ($$$$$$)
push @lines, "$destination\n";
# printf "cp $sourcepath $destdir$destination\n";
+ if(-d "$destdir$destination"){
+ #printf "Deleting already present Directory $destdir$destination from previous builds\n";
+ rmtree("$destdir$destination");
+ }
+ if(-e "$destdir$destination") {
+ #printf "Deleting already present file $destdir$destination from previous builds\n";
+ unlink "$destdir$destination";
+ }
+
copy ("$sourcepath", "$destdir$destination") || die "Can't copy file: $sourcepath -> $destdir$destination $!";
my $sourcestat = stat($sourcepath);
utime ($sourcestat->atime, $sourcestat->mtime, "$destdir$destination");
chmod (oct($unixrights), "$destdir$destination") || die "Can't change permissions: $!";
- push @lines, "$destination\n";
+ push @lines, "$destination\n";
}
for ( my $i = 0; $i <= $#{$linksarray}; $i++ )
@@ -807,6 +817,10 @@ sub install_simple ($$$$$$)
my $destinationfile = $onelink->{'destinationfile'};
# print "link $destinationfile -> $destdir$destination\n";
+ if(-e "$destdir$destination") {
+ #printf "Deleting already present symlink $destdir$destination from previous builds\n";
+ unlink "$destdir$destination";
+ }
symlink ("$destinationfile", "$destdir$destination") || die "Can't create symlink: $!";
push @lines, "$destination\n";
}
More information about the Libreoffice-commits
mailing list