releasing/cbrtools/perl/RelTransfer/Export.pm
author kelvzhu
Mon, 18 Oct 2010 16:16:46 +0800
changeset 655 3f65fd25dfd4
parent 602 3145852acc89
permissions -rw-r--r--
sync up SVN codes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
# RelTransfer::Export.pm
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
package RelTransfer::Export;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
use strict;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
use ExportData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
use Utils;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
use Cwd;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
use RelTransfer;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
use vars qw(@ISA);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
@ISA=("RelTransfer");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
# Constructor
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
sub Initialize {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
  $self->SUPER::Initialize();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
  $self->{exportData} = ExportData->New(exports_file => $self->{iniData}->ExportDataFile(),
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
					verbose => $self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
  #check to see if all the pgp keys used for exporting exist on the public keyring
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
  my @pgpKeys = @{$self->{iniData}->PgpEncryptionKeys};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
  unless (@pgpKeys) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
    die "Error: No PGP encrypting keys defined in reltools.ini\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
  push @pgpKeys, @{$self->{exportData}->AllPgpKeys};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
  foreach my $pgpKey (@pgpKeys) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
    unless ($self->{crypt}->PublicKeyExists($pgpKey)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
      die "Error: PGP key $pgpKey is required for exporting but does not exist on public keyring\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
  }	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
# Public methods
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
sub CheckExportable {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
  unless ($self->ReleaseExistsInLocalArchive($comp, $ver)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
    die "Error: $comp $ver does not exist in local archive\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
  unless ($self->{exportData}->ComponentIsExportable($comp)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
    print "Warning: component \"$comp\" is not defined in export table.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
sub TransferRelease {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
  if ($self->{verbose}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
    print "\nExporting $comp $ver...\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
  #check to see if ok to export
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
  unless ($self->ReleaseExistsInLocalArchive($comp, $ver)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
    die "Error: $comp $ver does not exist in local archive\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
  my $releaseExists = $self->ReleaseExistsOnRemoteSite($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
  unless ($self->{exportData}->ComponentIsExportable($comp)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
    if (not $releaseExists or $self->{force}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
      die "Error: cannot export $comp: not defined in export table\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
    else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
      if ($self->{verbose}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
	print "$comp $ver already exported to remote site\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
      }	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
      return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
    if ($releaseExists and not $self->{force}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
      if ($self->{verbose}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
	print "$comp $ver already exported to remote site\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
      }	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
      return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
  #encrypt, zip and then send release to remote site
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
  eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
    my $localdir = $self->PathData->LocalArchivePathForExistingComponent($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
    print "Local directory for \"$comp\" \"$ver\" is \"$localdir\"\n" if ($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
    $self->EncryptReleaseFiles($comp, $ver, $localdir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
    $self->ZipEncryptedReleaseFiles($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
    $self->SendZippedReleaseFile($comp, $ver, $localdir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
    return 1 if ($self->{dummy});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
    my $localsize = $self->SizeOfNewlyZippedFile($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
    my $remotesize = $self->SizeOfRemoteFile($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
    $self->CompareSizes($localsize, $remotesize, $comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
  if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
    my $error = $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
    $self->CleanupTempDir();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
    die $error;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
  #optionally send a log file to the remote site
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
  if (defined $self->{iniData}->RemoteLogsDir) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
    eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
      $self->SendLogFile($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
    };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
    if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
      print "Warning: Export of log file failed. $@\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
  #delete all the files in the temporary directory
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
  $self->CleanupTempDir();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
  if ($self->{verbose}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
    print "$comp $ver successfully exported to remote site.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
  return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
sub ExamineExportedRelease {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
  unless ($self->ReleaseExistsInLocalArchive($comp, $ver)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
    die "Error: $comp $ver does not exist in local archive\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
  eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
    my $localdir = $self->PathData->LocalArchivePathForExistingComponent($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
    my $remotesize = $self->SizeOfRemoteFile($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
    $self->EncryptReleaseFiles($comp, $ver, $localdir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
    $self->ZipEncryptedReleaseFiles($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
    my $localsize = $self->SizeOfNewlyZippedFile($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
    $self->CompareSizes($localsize, $remotesize, $comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
  if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
    my $error = $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
    $self->CleanupTempDir();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
    die $error;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
  $self->CleanupTempDir();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
# Private methods
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
sub CompareSizes {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
  my $localsize = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
  my $remotesize = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
  my $comp = shift; # comp and ver are just used for error messages
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
  my $diff = abs ($remotesize - $localsize);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
  if ($diff == 0) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
    return; # disappointingly rare
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
  } elsif ($diff <=8) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
    print "Warning: the size of the exported $comp $ver is slightly different ($remotesize) to the local copy ($localsize): difference $diff. This may be due to the way the remote site reports sizes, or the randomness of PGP encryption.\n" if ($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
  } else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
    die "Error: $comp $ver exported file size ($remotesize) differs from local copy ($localsize)\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
sub SizeOfNewlyZippedFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
  my $tempDir = Utils::TempDir();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
  my $zipName = "$tempDir/$comp$ver.zip";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
  die "Error: newly zipped file \"$zipName\" for $comp $ver didn't exist\n" unless -e $zipName;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
  return -s $zipName;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
sub SizeOfRemoteFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
  die "No component name provided to SizeOfRemoteFile" unless $comp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
  die "No version for $comp provided to SizeOfRemoteFile" unless $ver;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
  my $remoteFile = $self->PathData->RemoteArchivePathForExistingComponent($comp, $ver, $self->{remoteSite})."/$comp$ver.zip";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
  die "Error: $comp $ver didn't exist on the remote site\n" unless $remoteFile;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
  return $self->{remoteSite}->FileSize($remoteFile);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
sub EncryptReleaseFiles {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
  my $relDir = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
  my $tempDir = Utils::TempDir();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
  my %excludedKeys;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
  @excludedKeys{@{$self->{exportData}->AllPgpKeys()}} = ();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
  #encrypt release files using pgp keys from export table and reltools.ini
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
  opendir(RELDIR, $relDir) or die "Error: Cannot open $relDir\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
  while (defined(my $file = readdir RELDIR)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
    my @pgpKeys;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
    next if ($file =~ /^\.\.?$/);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
    if ($file =~ /^(exports)([a-z])\.zip$/i or $file =~ /^(exports)([a-z])\.txt$/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
      @pgpKeys = @{$self->{exportData}->PgpKeysForExports($comp, $2)};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
    elsif ($file =~ /^(source)([a-z])\.zip$/i or $file =~ /^(source)([a-z])\.txt$/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
      if($self->{excludeSource}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
        print "Skipping the encryption of source file $file (in directory \"$relDir\")\n" if ($self->{verbose});	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
        next;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
      @pgpKeys = @{$self->{exportData}->PgpKeysForSource($comp, $2)};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
    elsif ( $file =~ /^reldata$/i ){
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
      @pgpKeys = @{$self->{exportData}->PgpKeysForRelData($comp)};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
    elsif ($file =~ /^binaries.zip$/i or $self->IsBinaryZipRequired($comp, $ver, $file)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
      @pgpKeys = @{$self->{exportData}->PgpKeysForBinaries($comp)};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
    } 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
    else { 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
      die "Error: Unexpected release file \"$file\" in $comp $ver\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
    #do the encryption
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
    if (@pgpKeys) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
      push @pgpKeys, @{$self->{iniData}->PgpEncryptionKeys}; #encrypt with users keys aswell
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
      print "Encrypting \"$file\" (in directory \"$relDir\") to keys @pgpKeys\n" if ($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
        # Warning: productisation scripts may depend on the format of the above line.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
      $self->{crypt}->Encrypt("$relDir/$file", "$tempDir/$file.pgp", \@pgpKeys) unless ($self->{dummy});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
      #Remove the keys that have been used from the list of keys which have been excluded for this release
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   259
      delete @excludedKeys{@pgpKeys};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   260
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   261
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   262
  closedir(RELDIR);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   263
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   264
  # DEF104279 The exclude keyword in the CBR export table breaks the exported archive.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   265
  # All keys which are not used for this release will be used to encrypt a file called exclude.txt
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   266
  # When the release is imported it will not give the unable to decrypt any part error
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   267
  # as it can decrypt the exclude.txt file.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   268
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   269
  if (keys %excludedKeys) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   270
    # Create an exclude.txt in the reldir  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   271
    open (EXCLUDE, ">$tempDir/exclude.txt");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   272
    print EXCLUDE "If you can decrypt this file then this release has been excluded for you based on your PGP key\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   273
    close EXCLUDE;    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   274
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   275
    $self->{crypt}->Encrypt("$tempDir/exclude.txt", "$tempDir/exclude.txt.pgp", \@{[keys %excludedKeys]}) unless ($self->{dummy});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   276
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   277
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   278
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   279
sub IsBinaryZipRequired {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   280
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   281
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   282
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   283
  my $zip = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   284
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   285
  # If the required_binaries keyword isn't used, we need all builds
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   286
  return 1 unless defined $self->{iniData}->RequiredBinaries($comp);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   287
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   288
  unless ($zip =~ /^binaries_(.*)\.zip$/) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   289
    die "Error: Unexpected file \"$zip\" in $comp $ver\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   290
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   291
  my $category = $1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   292
  foreach my $requiredBinary (@{$self->{iniData}->RequiredBinaries($comp)}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   293
    if ($category =~ /^$requiredBinary/) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   294
      return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   295
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   296
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   297
  return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   298
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   299
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   300
sub ZipEncryptedReleaseFiles {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   301
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   302
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   303
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   304
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   305
  if ($self->{verbose}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   306
    print "Zipping encrypted files to $comp$ver.zip ...\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   307
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   308
	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   309
  #build up list of pgp encrypted files in TEMP_DIR 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   310
  my $tempDir = Utils::TempDir();  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   311
  opendir(TEMPDIR, $tempDir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   312
  my @encryptedFiles = grep {/\.pgp$/} readdir TEMPDIR;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   313
  closedir(TEMPDIR);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   314
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   315
  unless (@encryptedFiles || $self->{dummy}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   316
    die "Error: No encrypted files exist in $tempDir\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   317
  }	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   318
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   319
  #zip list of pgp encrypted files (archive only, no compression)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   320
  my $origDir = getcwd();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   321
  chdir($tempDir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   322
  my $zipName = "$tempDir/$comp$ver.zip";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   323
  print "Zipping @encryptedFiles to \"$zipName\"\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   324
  eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   325
    Utils::ZipList($zipName, \@encryptedFiles, $self->{verbose} > 1, 1) unless ($self->{dummy});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   326
  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   327
  chdir ($origDir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   328
  if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   329
    die $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   330
  }	 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   331
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   332
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   333
sub SendZippedReleaseFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   334
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   335
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   336
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   337
  my $localdir = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   338
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   339
  my $localFile = Utils::TempDir()."/$comp$ver.zip";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   340
  my $remoteFile = $self->PathData->RemoteArchivePathForExportingComponent($comp, $ver, $localdir, $self->{remoteSite})."/$comp$ver.zip";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   341
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   342
  print "Sending \"$localFile\" to \"$remoteFile\"\n" if ($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   343
  $self->{remoteSite}->SendFile($localFile, $remoteFile) unless ($self->{dummy});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   344
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   345
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   346
sub SendLogFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   347
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   348
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   349
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   350
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   351
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   352
  my $localLogFile = Utils::TempDir()."/$comp$ver.log";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   353
  my $remoteLogFile = $self->{iniData}->RemoteLogsDir($comp)."/$comp$ver.log";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   354
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   355
  if ($self->{verbose}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   356
    print "Sending $comp $ver log file to remote site \"$remoteLogFile\"\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   357
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   358
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   359
  return if ($self->{dummy});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   360
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   361
  #create empty log file
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   362
  open LOG, ">$localLogFile"  or die "Error: Cannot open $localLogFile for writing\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   363
  close LOG;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   364
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   365
  #send log file to the remote site
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   366
  $self->{remoteSite}->SendFile($localLogFile, $remoteLogFile);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   367
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   368
  unlink $localLogFile;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   369
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   370
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   371
1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   372
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   373
__END__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   374
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   375
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   376
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   377
RelTransfer::Export.pm - Export releases to the remote site
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   378
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   379
=head1 SYNOPSIS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   380
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   381
 use RelTransfer::Export;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   382
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   383
 $exporter = RelTransfer::Export->New(ini_data => $iniData,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   384
				      force => 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   385
				      verbose => 1);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   386
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   387
 $exporter->TransferRelease('componentname', 'componentversion');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   388
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   389
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   390
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   391
Implements the abstract TransferRelease method from the C<RelTransfer> base class module which transfers a release from the local archive to the remote site.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   392
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   393
=head1 INTERFACE
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   394
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   395
=head2 New
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   396
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   397
Passed an argument list in the form of hash key value pairs. The supported arguments are...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   398
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   399
 ini_data    =>  $iniData_object
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   400
 force       =>  $force_integer
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   401
 verbose     =>  $verbosity_integer
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   402
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   403
Returns a reference to a C<RelTransfer::Export> object.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   404
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   405
=head2 TransferRelease
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   406
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   407
Passed a component name and version number. Performs the following steps:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   408
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   409
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   410
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   411
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   412
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   413
Check to see if the release can or needs to be exported. If the component does not exist in the users export table no attempt will be made to export it. If the component is listed in the export table but the release already exists on the remote site then, again, no attempt will be made to export it (unless the C<force> member variable is set to a nonzero value)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   414
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   415
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   416
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   417
Encrypt the release files (ie source zips, binaries zip and reldata file). The keys used to encrypt the files depend on the data stored in the users export table 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   418
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   419
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   420
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   421
Create a zip archive (without compression) of the encrypted files 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   422
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   423
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   424
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   425
Send the release zip file to the remote site
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   426
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   427
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   428
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   429
If a remote logs dir is defined in the F<reltools.ini> file send an empty log file to the remote site 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   430
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   431
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   432
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   433
=head2 ExamineExportedRelease
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   434
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   435
This goes through most of the same stages above, but instead of actually transferring the zip file, it will ensure that the size of the existing file on the remote site matches that which is expected.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   436
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   437
=head1 KNOWN BUGS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   438
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   439
None
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   440
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   441
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   442
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   443
 Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   444
 All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   445
 This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   446
 under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   447
 which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   448
 at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   449
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   450
 Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   451
 Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   452
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   453
 Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   454
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   455
 Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   456
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   457
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   458
=cut