summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2008-12-09 16:00:09 +0000
committerRelease Engineers <releng@openoffice.org>2008-12-09 16:00:09 +0000
commitbf702c3e70ae6996dfe8a7a5d046e9a0a785354c (patch)
tree6aebf914ea5f847e810f2264db5054849ce2363b /solenv/bin
parent63425502edc918a9bd88a2b2344104328d2c8ce8 (diff)
#100000# rename linked modules for subversion, fix for module outside start
Diffstat (limited to 'solenv/bin')
-rw-r--r--solenv/bin/build.pl28
1 files changed, 17 insertions, 11 deletions
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 45d7a188f142..79dd57122bda 100644
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -195,7 +195,7 @@
# the server considered as an error/client crash
my %lost_client_jobs = (); # hash containing lost jobs
my %job_jobdir = (); # hash containing job-dir pairs
-
+ my $is_svn = 0;
### main ###
get_options();
@@ -218,6 +218,7 @@
};
$StandDir = get_stand_dir(); # This also sets $CurrentPrj
+ $is_svn++ if (-e $StandDir.$CurrentPrj.'/.svn');
provide_consistency() if (defined $ENV{CWS_WORK_STAMP} && defined($ENV{COMMON_ENV_TOOLS}));
$deliver_command = $ENV{DELIVER};
@@ -902,7 +903,6 @@ sub get_stand_dir {
} else {
$StandDir = cwd();
};
- print "curr dir: $StandDir\n";
my $previous_dir = '';
do {
foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
@@ -921,7 +921,7 @@ sub get_stand_dir {
my @dirlist = split(/\//,Cwd::realpath($StandDir));
pop @dirlist; # discard last dirname;
$StandDir = join('/', @dirlist);
- print "next dir: $StandDir\n";
+ print_error('Found no project to build') if (!$StandDir);
}
# while (chdir '..');
while (chdir "$StandDir");
@@ -1306,7 +1306,7 @@ sub get_options {
$incompatible = scalar keys %incompatibles;
if ($prepare) {
print_error("--prepare is for use with --from switch only!\n") if (!$incompatible);
- if ( $^O eq 'MSWin32' ) {
+ if ( $^O eq 'MSWin32' && !$is_svn) {
print "\nATTENTION: Using Windows OS to prepare the CWS is highly unrecommended! It is unsequre and veeeery slooooow. The links will not be broken, the delivered files from the linked modules will not be undelivered, moreover file removal can fail. Use UNIX if possible. Proceed only if you exactly know what you do, otherwise break the build with Ctrl+C\n\n";
sleep(10);
};
@@ -2071,6 +2071,11 @@ sub ensure_clear_module {
};
};
if ($module_type eq 'lnk') {
+ if ($is_svn) {
+ if(!rename("$StandDir$lnk_name", "$StandDir$module")) {
+ $action = 'rename';
+ };
+ } else {
if ( $^O eq 'MSWin32' ) {
my $message = "The link $lnk_name will not be broken. This can cause inconsistent build";
print STDERR "\nWarning: $message\n";
@@ -2082,14 +2087,15 @@ sub ensure_clear_module {
checkout_module($module);
my $action = '';
};
- if ( $^O eq 'MSWin32' ) {
- if(!rename("$StandDir$lnk_name", "$StandDir$module.backup.lnk")) {
- $action = 'rename';
+ if ( $^O eq 'MSWin32' ) {
+ if(!rename("$StandDir$lnk_name", "$StandDir$module.backup.lnk")) {
+ $action = 'rename';
+ };
+ } else {
+ if(!unlink $StandDir.$lnk_name) {
+ $action = 'remove';
+ }
};
- } else {
- if(!unlink $StandDir.$lnk_name) {
- $action = 'remove';
- }
};
print_error("Cannot $action $StandDir$lnk_name. Please $action it manually") if ($action);
} else {