releasing/cbrtools/perl/Symbian/CBR/release/Manifest.pm
author lorewang
Wed, 01 Dec 2010 16:05:36 +0800
changeset 715 e0739b8406dd
parent 602 3145852acc89
permissions -rw-r--r--
Specify extenal tool with path
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2007-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
# Symbian::CBR::Release::Manifest.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 Symbian::CBR::Release::Manifest;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
use File::Basename;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
use File::Spec;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
use File::Path;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
use RelData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
use XML::Simple;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
use Carp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
use POSIX qw(strftime);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
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
#Constants
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
use constant MD5                => 'md5';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
use constant SIZE               => 'size';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
use constant MODIFIED_TIME      => 'modified-timestamp';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
use constant VERSION            =>   '1.0.0';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
#Public.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
sub new {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
  my $pkg = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
  my $iniData = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
  my $verbose = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
  my $self;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
  $self->{iniData} = $iniData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
  $self->{verbose} = $verbose;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
  bless $self, $pkg;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
  return $self;
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
sub GenerateManifest {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
  my $version = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
  my $archive = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
  my $relData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
  if (defined $archive) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
    $relData  = RelData->OpenExternal($archive, $comp, $version);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
    $relData = RelData->Open($self->{iniData}, $comp, $version, $self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
  $self->{'baselineName'} = $comp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
  $self->{'baselineVersion'} = $version;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
  print "Generating Release manifest file.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
  #Get envirnoment from baseline's reldata.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
  my $environment = $relData->Environment();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
  foreach my $thisComp (sort keys %{$environment}){
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
    #Identify the release directory for all components.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
    my $thisVer = $environment->{$thisComp};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
    print "Reading $thisComp $thisVer.\n " if($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
    my $relDir;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
    if (defined $archive) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
      $relDir = File::Spec->catdir($archive, $thisComp, $thisVer);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
    else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
      $relDir = $self->{iniData}->PathData->LocalArchivePathForExistingComponent($thisComp, $thisVer);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
    croak "$thisComp $thisVer doesn't exist.\n" unless(-e $relDir);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
    opendir(RELDIR, $relDir) or croak "Error: can't opendir $relDir\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
    my @allFiles = grep {$_ ne '.' and $_ ne '..'} map {"$relDir\\$_"} readdir(RELDIR);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
    close RELDIR;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
    $self->{components}{$thisComp}{version} = $thisVer;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
    #List all files from component release.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
    foreach my $thisFile (@allFiles) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
      my $file = basename($thisFile);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
      next if($file eq "." or $file eq "..");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
      #Record size, md5 checksum and modified timestamp for all files.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
      open(FILEHANDLE,"$thisFile") or croak "Couldn't open file \"$thisFile\".\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
      $md5 = Digest::MD5->new;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
      $md5->addfile(FILEHANDLE);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
      close FILEHANDLE;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
      my $modifiedTimeStamp = Utils::FileModifiedTime($thisFile);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
      $self->{components}{$thisComp}{files}{$file}{+SIZE} = -s $thisFile;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
      $self->{components}{$thisComp}{files}{$file}{+MD5} = $md5->hexdigest;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
      $self->{components}{$thisComp}{files}{$file}{+MODIFIED_TIME} = $modifiedTimeStamp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
sub Save {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
  my $manifestFilePath = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
  unless (-d $manifestFilePath) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
    eval {mkpath($manifestFilePath)};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
    if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
      my $error = $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
      $error =~ s/ at .*?(?i:manifest\.pm) line \d+$//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
      die "Error: Unable to create path $manifestFilePath: $error\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
  print "Writing release manifest to $manifestFilePath path.\n ";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
  my $release = {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
        version =>   VERSION,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
        meta => { 'baseline-name' => { 'value' => $self->{'baselineName'} },
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
                  'baseline-version' => { 'value' => $self->{'baselineVersion'} },
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
                  'created-time' => { 'value' => strftime( '%Y-%m-%dT%H:%M:%S', localtime() ) } },
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
        manifest => { component => [] }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
  my $manifest = $self->{'baselineName'} ."_".$self->{'baselineVersion'}."_manifest.xml";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
  my $manifestFile = File::Spec->catfile( $manifestFilePath, $manifest );
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
  my $components = {};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
  foreach  my $thisComp(sort keys %{$self->{components}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
    $thisVer = $self->{components}{$thisComp}{version};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
    my $index = "$thisComp,$thisVer";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
    foreach  my  $thisFile (sort keys %{$self->{components}{$thisComp}{files}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
      my $file = { 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
           'name' => $thisFile,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
           'size' => $self->{components}{$thisComp}{files}{$thisFile}{+SIZE},
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
           'md5'  => $self->{components}{$thisComp}{files}{$thisFile}{+MD5},
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
           'modified-timestamp' => $self->{components}{$thisComp}{files}{$thisFile}{+MODIFIED_TIME}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
	  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
      if (!defined $components->{$index}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
        $components->{$index} = { file => [], name => $thisComp, version => $thisVer }; # make ref
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
        push @{$release->{manifest}{component}}, $components->{$index};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
      push @{$components->{$index}{file}}, $file;
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
  eval {XMLout(
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
        $release,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
        xmldecl     => '<?xml version="1.0" ?>',
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
        rootname    => 'release',
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
        outputfile  => $manifestFile )};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
  croak "Error: Can't write manifest file: $@\n" if $@;
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
sub Load {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
  my $manifestFile = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
  if (!-e $manifestFile) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
    die "Error: Can't read manifest file '$manifestFile': File does not exist\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
  my %metaFieldMap = qw(baseline-name baselineName baseline-version baselineVersion created-time createdTime);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
  my $release   = eval{XMLin(
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
                    $manifestFile,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
                    forcearray => [ qw(component file) ],
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
                    keyattr => [])};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
  die "Error: Can't read manifest file '$manifestFile': $@\n" if $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
  print "Reading $manifestFile file.\n " if($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
  for my $meta (@{$release->{meta}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
    $self->{$metaFieldMap{$meta->{name}}} = $meta->{value};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
  foreach my $component ( @{ $release->{manifest}{component} } ) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
    my $comp = $component->{'name'};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
    my $version = $component->{version};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
    $self->{components}{$comp}{version} = $version;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
    foreach my $file ( @{ $component->{file} } ) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
      my $fileName = $file->{'name'};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
      $self->{components}{$comp}{files}{$fileName}{+SIZE} = $file->{+SIZE};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
      $self->{components}{$comp}{files}{$fileName}{+MD5} = $file->{+MD5};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
      $self->{components}{$comp}{files}{$fileName}{+MODIFIED_TIME} = $file->{+MODIFIED_TIME};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
sub FileExists {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
  my $file = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
  croak "Error: Component and file name must be specified.\n" unless(defined $comp and defined $file);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
  return exists $self->{components}{$comp}{files}{$file};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
__END__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
Symbian::CBR::Release::Manifest.pm - Provides an interface to data associated with a particular release.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
=head2 new
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
Creates a new Symbian::CBR::Release::Manifest object. Expects to be passed a reference to an iniData object and verbose level.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
=head2 GenerateManifest
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
Expects to be passed a component, version and optionally archive path. Generates a release manifest hash using component version and archive if provided. Otherwise uses archive specified in reltools.ini.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
=head2 Save
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
Expects to be passed a destination path. Create destination path if destination path is not existing, and save the hash structure to manifest.xml file.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
=head2 Load
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
Expects to be passed a manifest file path. Reads manifest file and converts into a hash structure.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
=head2 FileExists
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
Expects to be passed a component name and file name. If file is present in the component returns 1, otherwise 0.
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) 2007-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