releasing/cbrtools/perl/EnvInfoTk
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 Tk; 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
use Tk::Table; 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
use Getopt::Long;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
use IniData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
use EnvDb;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
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
# Constants.
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
my $margin = 2;
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
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
# Globals.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
my $verbose = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
my $full = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
my $component;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
my $iniData = IniData->New();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
my $envDb;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
my $overallStatus;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
my $displayClean = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
my $displayDirty = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
my $displayPendingRelease = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
my $noScan = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
# Main.
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
ProcessCommandLine();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
CheckEnv();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
DisplayInfo();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
# Subs.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
sub ProcessCommandLine {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
  Getopt::Long::Configure ("bundling");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
  my $help;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
  GetOptions("h" => \$help, "f" => \$full, "c" => \$displayClean, "d" => \$displayDirty, "p" => \$displayPendingRelease, "n" => \$noScan, "v+" => \$verbose);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
  if ($help) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
    Usage(0);
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
  if (not $full and ($displayClean or $displayDirty or $displayPendingRelease)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
    print "Warning: Inappropriate option(s)\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
  if (not $displayClean and not $displayDirty and not $displayPendingRelease) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
    $displayClean = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
    $displayDirty = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
    $displayPendingRelease = 1;
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
  $component = $ARGV[0];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
  $envDb = EnvDb->Open($iniData, $verbose);
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
sub Usage {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
  my $exitCode = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
  Utils::PrintDeathMessage($exitCode, "\nUsage: envinfo [options] [<component>]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
options:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
-h  help
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
-v  verbose output (-vv very verbose)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
-f  display full information (the remaining switches only apply when this is used)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
-c  display the components with status \"clean\"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
-d  display the components with status \"dirty\"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
-p  display the components with status \"pending release\"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
-n  no scan");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
sub CheckEnv {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
  unless ($noScan or not $full) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
    if (defined $component) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
      $envDb->CheckComp($component);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
    else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
      ($overallStatus) = $envDb->CheckEnv();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
sub DisplayInfo {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
  # Create a list of the components to be displayed.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
  my @comps;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
  if (defined $component) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
    my $ver = $envDb->Version($component);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
    unless (defined $ver) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
      die "Error: $component not found\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
    push @comps, $component;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
    my $versionInfo = $envDb->VersionInfo();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
    foreach my $comp (sort keys %{$versionInfo}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
      push @comps, $comp;
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
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
  my $tableData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
  if ($full) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
    $tableData = GenFullInfoTable(\@comps);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
    $tableData = GenMinimalInfoTable(\@comps);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
  # Only print the table if there's something in it.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
  if (scalar(@$tableData) > 1) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
    print "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
    DisplayTable($tableData, 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
  # Only display the overall status if a full check was done.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
  if (defined $overallStatus) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
    print "\nOverall status: ", EnvDb::StatusString($overallStatus), "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
sub GenMinimalInfoTable {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
  my $comps = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
  # Create a two dimentional array of the data to be printed.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
  my $tableData = [["Component", "Version"]];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
  my $row = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
  foreach my $comp (@$comps) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
    my $ver = $envDb->Version($comp);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
    $tableData->[$row++] = [$comp, $ver];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
  return $tableData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
sub GenFullInfoTable {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
  my $comps = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
  # Create a two dimentional array of the data to be printed.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
  my $tableData = [["Component", "Version", "Internal version", "Status", "Mrp"]];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
  my $row = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
  foreach my $comp (@$comps) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
    my $ver = $envDb->Version($comp);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
    my $status = $envDb->Status($comp);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
    if (not $displayClean and $status == EnvDb::STATUS_CLEAN) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
      next;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
    elsif (not $displayDirty and ($status == EnvDb::STATUS_DIRTY or $status == EnvDb::STATUS_DIRTY_SOURCE)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
      next;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
    elsif (not $displayPendingRelease and $status == EnvDb::STATUS_PENDING_RELEASE) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
      next;
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
    my $mrpName = $envDb->MrpName($comp);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
    unless (defined $mrpName) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
      $mrpName = "-";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
    my $intVer = $envDb->InternalVersion($comp);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
    unless (defined $intVer) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
      $intVer = "-";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
    $tableData->[$row++] = [$comp, $ver, $intVer, EnvDb::StatusString($status), $mrpName];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
  return $tableData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
sub DisplayTable {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
  my $tableData = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
  my $numRows = scalar(@{$tableData});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
  die unless $numRows and defined $tableData->[0]; # There must be at least one column and row.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
  my $numCols = scalar(@{$tableData->[0]});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
  my $mw = MainWindow->new();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
  CreateGrid($mw, $tableData);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
  MainLoop();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
sub CreateGrid() {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
  my $mw = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
  my $data = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
  my $numRows = scalar(@{$data});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
  die unless $numRows and defined $data->[0]; # There must be at least one column and row.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
  my $numCols = scalar(@{$data->[0]});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
  foreach my $row (0 ... $numRows - 1) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
    my @row;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
    foreach my $col (1 ... $numCols - 1) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
      $row[$col - 1] = $mw->Label(-text => $data->[$row][$col],
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
				  -justify => 'left',
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
				  -background => 'blue');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
    $mw->Label(-text => $data->[$row][0],
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
	       -justify => 'left')->grid(@row,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
					 -sticky => 'nsew');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
EnvInfoTk - Displays information about the installed components in the current environment.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
=head1 SYNOPSIS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
  envinfo [options] [<component>]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
options:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
  -h  help
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
  -v  verbose output (-vv very verbose)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
  -f  display full information (the remaining switches only apply when this is used)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
  -c  display the components with status "clean"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
  -d  display the components with status "dirty"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
  -p  display the components with status "pending release"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
  -n  no scan
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
By default displays a brief summary table of the information contained in the current drive's environment database. For example:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
 Component   Version
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
 mycomp1     026
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
 mycomp2     057
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
If envoked with the C<-f> switch a full table is displayed:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
 Component   Version   Internal version                       Status   Mrp
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
 mycomp1     026       //myproject/latest/mycomp1/...@10106   clean    \mycomp1\mycomp1.mrp
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
 mycomp2     057       //myproject/latest/mycomp1/...@10157   clean    \mycomp2\mycomp2.mrp
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   259
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   260
 Overall status: clean
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   261
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   262
The C<Component> and C<Version> fields are self explanatory. The C<Internal version> field is a label used by the site that owns the component, to store an internal reference (normally generated by their source control system). This is likely to be of use only to the owning site. The C<Status> field may have the following values:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   263
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   264
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   265
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   266
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   267
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   268
B<clean> - The component's binaries all match the time stamp information that was stored when they were installed.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   269
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   270
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   271
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   272
B<dirty> - One or more of the component's binaries doesn't match the time stamp information that was stored when they were installed. This may be because the source has been re-built but not changed (see the commands C<ValidateRel> and C<ValidateEnv> for details of how to check if a re-built set of binaries are identical to an already released set), or because changes have been made.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   273
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   274
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   275
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   276
B<pending release> - The component is waiting to be released (see the commands C<PrepEnv> and C<MakeEnv> for details of how to make releases).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   277
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   278
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   279
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   280
The C<Mrp> field contains the name of the F<mrp> file that was used when the release was made. The overall status of the environment is displayed last. This may have the following values:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   281
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   282
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   283
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   284
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   285
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   286
B<clean> - All the installed components have a status of C<clean> and there are no files in the F<\epoc32> tree that have unkown origins (i.e. they are all known to belong to a component).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   287
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   288
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   289
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   290
B<dirty> - One or more of the installed components has a status of C<dirty>, or there is one or more files in the F<\epoc32> tree that has unknown origins.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   291
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   292
=item *
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   293
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   294
B<pending release> - All components have a status of either C<clean> or C<pending release> and there are no files in the F<\epoc32> with unknown origins.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   295
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   296
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   297
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   298
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   299
By default C<EnvInfoTk> will perform a scan of the F<\epoc32> tree checking all the time stamps. To avoid this processing, use the C<-n> switch. This will cause the status of each component when the last scan was performed to be displayed (which may now be out of date). The output of C<EnvInfoTk> can be filtered according to status using the switches C<-c>, C<-d> and C<-p>. For example, if you wanted to view all the components that are either C<dirty> or C<pending release>, type:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   300
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   301
  envinfo -dp
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   302
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   303
If envoked with a C<component> argument, then only the details of the specified component will be displayed and a scan of the F<\epoc32> tree will not be performed.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   304
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   305
=head1 KNOWN BUGS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   306
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   307
None.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   308
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   309
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   310
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   311
 Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   312
 All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   313
 This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   314
 under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   315
 which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   316
 at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   317
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   318
 Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   319
 Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   320
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   321
 Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   322
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   323
 Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   324
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   325
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   326
=cut