releasing/cbrtools/perl/ImportEnv
author Ross Qin <ross.qin@nokia.com>
Tue, 30 Nov 2010 14:05:41 +0800
changeset 713 7b7f0409fc00
parent 602 3145852acc89
permissions -rw-r--r--
merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
#!perl
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
use strict;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
use FindBin;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
use lib "$FindBin::Bin";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
use Getopt::Long;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
use File::Path;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
use IniData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
use RelData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
use RelTransfer::Import;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
use CommandController;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
# Globals.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
my $verbose = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
my $ftpResume = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
my $iniData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
my $commandController;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
my $envcomp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
my $envver;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
my $passphraseFile;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
my $force;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
my $noPassphraseRetry;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
my %goodImports;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
my %failedImports;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
my %alreadyImported;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
# Main.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
ProcessCommandLine();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
ImportEnvironment();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
PrintReport();
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
# Subs.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
sub ProcessCommandLine {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
  Getopt::Long::Configure ("bundling");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
  my $help;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
  GetOptions("h" => \$help, "v+" => \$verbose, "r" => \$ftpResume, "p=s" => \$passphraseFile, "f" => \$force, "noPassphraseRetry" => \$noPassphraseRetry);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
  if ($help) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
    Usage(0);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
  $envcomp = lc($ARGV[0]);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
  $envver = $ARGV[1];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
  unless (defined $envcomp and defined $envver and $#ARGV = -1) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
    print "Error: Invalid arguments\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
    Usage(1);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  $iniData = IniData->New(undef,1);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
  $commandController = CommandController->New($iniData, 'ImportEnv');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
  #if ftp resume option is used override value in reltools.ini
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
  if ($ftpResume) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
    $iniData->FtpServerSupportsResume(1);
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
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
sub Usage {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
  my $exitCode = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
  Utils::PrintDeathMessage($exitCode, "\nUsage: importenv [options] <component> <external_version>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
options:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
-h  help
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
-r  use FTP reconnect and resume transfer mode
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
-v  verbose output (-vv very verbose)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
-p <file>  file containing passphrase
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
-f  force the re-import of component releases
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
--noPassphraseRetry  Will cause ImportEnv to terminate if an incorrect passphrase is specified
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
N.B. You will be prompted for your passphrase unless the -p option is specified.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
Use of the -p option is NOT recommended though, as storing your passphrase in a file is considered a security risk.\n");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
sub ReadPassphraseFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
  return undef unless $passphraseFile;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
  open(PP, $passphraseFile) or die "Couldn't open passphrase file \"$passphraseFile\" because $!\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
  my $passphrase = join ("\n", <PP>);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
  close PP;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
  return $passphrase;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
sub ImportEnvironment {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
  my $importer = RelTransfer::Import->New(ini_data => $iniData, force => $force,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
					  verbose => $verbose, passphrase => ReadPassphraseFile);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
  #import the release to get the environment information
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
  eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
    $importer->TransferRelease($envcomp, $envver, $noPassphraseRetry);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
  if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
    print $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
    die "Aborting import of $envcomp $envver environment\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
  #read the environment information and transfer releases
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
  print "Reading $envcomp $envver environment...\n" if ($verbose);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
  my $relData = RelData->Open($iniData, $envcomp, $envver, $verbose);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
  my %env = %{$relData->Environment()};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
  delete $env{$envcomp};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
  #do the import checking for errors
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
  foreach my $comp (sort keys %env) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
    my $imported;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
    my $ver = $env{$comp};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
    eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
      $imported = $importer->TransferRelease($comp, $ver, $noPassphraseRetry);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
    };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
    if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
      print $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
      if ($@ =~ /cannot\s+connect/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
        print "\nAborting import of $envcomp $envver environment\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
        last;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
      my $error = $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
      chomp $error;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
      $error =~ s/^error: ("?$comp $ver"? )?//i;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
      $failedImports{$comp}->{$ver} = $error;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
      print "Aborting import of $envcomp $envver environment\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
      last;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
    else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
      if ($imported) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
        push (@{$goodImports{$comp}}, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
      } else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
        push (@{$alreadyImported{$comp}}, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
sub PrintReport {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
  print "\n=========IMPORT SUMMARY==========\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
  my $tableData = [["Component", "Version", "status"]];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
  foreach my $comp (sort keys %goodImports) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
    foreach my $ver (@{$goodImports{$comp}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
      push (@$tableData, [$comp, $ver, 'successfully imported']);
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
  foreach my $comp (sort keys %alreadyImported) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
    foreach my $ver (@{$alreadyImported{$comp}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
      push (@$tableData, [$comp, $ver, 'has already been imported']);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
  $iniData->TableFormatter->PrintTable($tableData, 1);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
  if (scalar (keys %alreadyImported) > 0) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
    print "\nYou can specify the -f option to force the re-import of component releases\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
  if (keys %failedImports) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
    print "\n=========FAILED IMPORTS==========\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
    print "\nImport Failure Summary\n\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
    my $failureTableData = [["Component", "Version", "Failure reason"]];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
    foreach my $comp (sort keys %failedImports) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
      foreach my $ver (sort keys %{$failedImports{$comp}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
        push (@$failureTableData, [$comp, $ver, $failedImports{$comp}->{$ver}]);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
    $iniData->TableFormatter->PrintTable($failureTableData, 1);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
    print "\nError: Unable to import environment successfully. Environment might be corrupted.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
  else
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
  {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
    if (keys %goodImports) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
      print "\nEnvironment $envcomp $envver successfully imported\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
    } else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
      print "\nNothing to do!\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
__END__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
ImportEnv - Imports the environment from which a component release was made.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
=head1 SYNOPSIS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
  importenv [options] <component> <version>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
options:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
  -h  help
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
  -r  use FTP reconnect and resume transfer mode
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
  -v  verbose output (-vv very verbose)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
  -p <file>  file containing passphrase
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
  -f  force the re-import of component releases
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
  --noPassphraseRetry  Will cause ImportEnv to terminate if an incorrect passphrase is specified
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
When a release is made, a description of the environment it was made from is stored with it.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
C<ImportEnv> takes a component name and version, reads the environment data for this
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
component and imports the necessary releases from a remote site if they do not already
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
exist on the local archive. If the environment data is not available from the local archive
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
an attempt is made to import this component first.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
If the C<-r> option is used and the FTP connection is dropped during the download of a release, the tools will automatically reconnect to the FTP site and resume the download. This feature may not be supported by some FTP servers.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
It is recommended NOT to use the -p option; you will be prompted for your
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
passphrase. Having a file containing your passphrase is be a security risk.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
=head1 KNOWN BUGS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
None
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
 Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
 All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
 This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
 under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
 which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
 at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
 Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
 Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
 Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
 Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
=cut