Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4455 dpurdie 1
########################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
#
4
# Module name   : jats_gen_releasenote.pl
5
# Module type   : Makefile system
6
# Compiler(s)   : Perl
7
# Environment(s): jats
8
#
9
# Description   : Generate the package Release Note
10
#                 Requires
11
#                   1) Release Note data generated by jats_get_releasenote_data.pl
12
#                   2) Target package in dpkg_archive
4619 dpurdie 13
#                   3) One or more built.files.xxx.xml (optional, but desirable)
4455 dpurdie 14
#
15
#                 Will:
4619 dpurdie 16
#                   Merge built.files.xxx.xml files into the release note data
4455 dpurdie 17
#                   Insert build meta data
18
#                   Save the Release Note MetaData within the package
19
#                   Generate the HTML release note - save within the package
4619 dpurdie 20
#                   Insert Release_Contents into RM Database
4455 dpurdie 21
#
22
# Usage:        See POD
23
#
24
#......................................................................#
25
 
26
require 5.008_002;
27
use strict;
28
use warnings;
29
 
30
use Pod::Usage;
31
use Getopt::Long;
32
use XML::Simple;
33
use File::Path;
34
use File::Copy;
35
use XML::Simple;
4546 dpurdie 36
use Digest::MD5;
37
use File::Find;
4455 dpurdie 38
 
39
use JatsError;
40
use JatsSystem;
41
use Getopt::Long;
42
use Pod::Usage;
43
use FileUtils;
44
use JatsEnv;
4550 dpurdie 45
use JatsRmApi;
4455 dpurdie 46
 
4550 dpurdie 47
use DBI;
48
 
4455 dpurdie 49
my $VERSION = "1.0.0";                                      # Update this. Inserted into meta data field
50
 
51
# User options
4612 dpurdie 52
my $opt_verbose = 0;
4455 dpurdie 53
my $opt_help = 0;
54
my $opt_archive;
55
my $archive_tag;
56
my $opt_pname;
57
my $opt_pversion;
58
my $opt_release_note;
59
my $opt_pvid;
60
my $opt_outname;
4619 dpurdie 61
my $opt_outputXml;
4550 dpurdie 62
my $opt_updateRmFiles;
4612 dpurdie 63
my $opt_workingDir;
4455 dpurdie 64
 
65
#   Global vars
4546 dpurdie 66
our $GBE_HOSTNAME;
4455 dpurdie 67
our $GBE_TOOLS;
68
my $DPKG_ROOT;
69
my $DPKG_DOC;
70
my $JATS_RN;
4612 dpurdie 71
my $OUT_ROOT;
4455 dpurdie 72
 
73
 
74
#
75
#   Structure to translate -archive=xxx option to archive variable
76
#   These are the various dpkg_archives known to JATS
77
#
78
my %Archive2Var =( 'main'       =>  'GBE_DPKG',
79
                   'store'      =>  'GBE_DPKG_STORE',
80
                   'cache'      =>  'GBE_DPKG_CACHE',
81
                   'local'      =>  'GBE_DPKG_LOCAL',
82
                   'sandbox'    =>  'GBE_DPKG_SBOX',
83
                   'deploy'     =>  'GBE_DPLY',
84
                   );
85
 
86
#-------------------------------------------------------------------------------
87
# Function        : Main Entry
88
#
89
# Description     :
90
#
91
# Inputs          :
92
#
93
# Returns         :
94
#
95
{
96
    my $result = GetOptions (
4550 dpurdie 97
                    "help+"         => \$opt_help,              # flag, multiple use allowed
98
                    "manual:3"      => \$opt_help,              # flag, set value
99
                    "verbose:+"     => \$opt_verbose,           # flag, increment
100
                    "archive=s"     => \$opt_archive,           # string
101
                    "releasenote=s" => \$opt_release_note,      # string
4612 dpurdie 102
                    "UpdateRmFiles" => \$opt_updateRmFiles,     # flag
103
                    "WorkDir=s"     => \$opt_workingDir,        # String
4455 dpurdie 104
                    );
105
 
106
    #
107
    #   Process help and manual options
108
    #
109
    pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result);
110
    pod2usage(-verbose => 1)  if ($opt_help == 2 );
111
    pod2usage(-verbose => 2)  if ($opt_help > 2);
112
 
113
    ErrorConfig( 'name'    =>'GenRn', 'verbose' => $opt_verbose );
4612 dpurdie 114
    InitFileUtils();
4455 dpurdie 115
 
116
    #
117
    #   Needed EnvVars
118
    #
4546 dpurdie 119
    EnvImport ('GBE_HOSTNAME');
4455 dpurdie 120
    EnvImport ('GBE_TOOLS');
121
    $JATS_RN = catdir($GBE_TOOLS, 'RELEASENOTES');
122
    Error("Release Note tools not found", $JATS_RN)
123
        unless (-d $JATS_RN);
124
 
125
 
126
    #
127
    #   Sanity Check
128
    #
129
    Error("Release Note data not provided") unless $opt_release_note;
130
    Error("Release Note data not found") unless -f $opt_release_note;
4612 dpurdie 131
    if (defined $opt_workingDir)
132
    {
133
        $opt_workingDir = FullPath($opt_workingDir);
134
        Error("Working directory is not a directory") unless -d $opt_workingDir;
135
        Error("Working directory is writable") unless -w $opt_workingDir;
136
    }
4455 dpurdie 137
 
138
    #
139
    #   Determine the target archive
140
    #   The default archive is GBE_DPKG, but this may be changed
141
    #
142
    $opt_archive = 'main' unless ( $opt_archive );
143
    my $archive_tag = $Archive2Var{$opt_archive};
144
    Error("Unknown archive specified: $opt_archive")
145
        unless ( $archive_tag );
146
    $DPKG_ROOT = $ENV{$archive_tag} || '';
147
    Verbose ("Archive Variable: $archive_tag" );
148
    Verbose2 ("Archive Path: $DPKG_ROOT" );
149
 
150
    #
151
    #   Process the release note and extract essential information
152
    #
153
    processReleaseNote();
154
 
155
    #
156
    #   Locate the target package
157
    #
158
    $DPKG_ROOT = catdir($DPKG_ROOT, $opt_pname, $opt_pversion);
4546 dpurdie 159
    Verbose ("Package Path: ", DisplayPath($DPKG_ROOT) );
4455 dpurdie 160
    Error ("Package not found in archive", $DPKG_ROOT) unless -d $DPKG_ROOT;
161
 
4612 dpurdie 162
    #   OUT_ROOT is really only used for testing
163
    #   Needs to mimic $DPKG_ROOT
164
    $OUT_ROOT = defined($opt_workingDir) ? $opt_workingDir : $DPKG_ROOT; 
165
    Verbose2 ("Output Path: $OUT_ROOT" );
166
 
4455 dpurdie 167
    #
4619 dpurdie 168
    #   Calculate output filenames
169
    #   Html Release Note:
170
    #       RELEASE_NOTES_PVID_PKGNAME_CLEANV.html
171
    #
172
    $DPKG_DOC = catdir($OUT_ROOT, 'doc');
173
    $opt_outputXml = catdir($DPKG_DOC, 'release_note.xml');
174
 
175
    my $cleanv = $opt_pversion;
176
    $cleanv =~ s~\.~_~g;
177
    $opt_outname = join('_',
178
                        'RELEASE_NOTES',
179
                        $opt_pvid,
180
                        $opt_pname,
181
                        $cleanv,    
182
                        ) . '.html';
183
    Verbose("Note Name: $opt_outname");
184
 
185
    #
4455 dpurdie 186
    #   Locate the release note data file
187
    #   This was created as a prerequisite to the build
188
    #   Note: windows requires '/' in the file list
189
    #
190
    my @filesList;
191
    foreach my $item ( glob(catdir($DPKG_ROOT, 'built.files.*.xml'))) {
192
        $item =~ s~\\~/~g;
193
        push @filesList, $item;
194
    }
4546 dpurdie 195
    unless (scalar @filesList > 0)
196
    {
4619 dpurdie 197
        Warning("No file list found within the package");
4546 dpurdie 198
        #
199
        #   No filelist found in the package
200
        #   This may occur for packages that did not go though the build system
201
        #   Create a package-list
202
        #
203
        my $item = generateFileList();
204
        $item =~ s~\\~/~g;
205
        push @filesList, $item;
206
    }
4455 dpurdie 207
 
208
    #
209
    #   Create output directory within the package
210
    #
211
    mkpath($DPKG_DOC, 0, 0775);
212
 
213
    #
214
    #   Merge the Release Note and the various file lists into a single
215
    #   XML file. Keep the file local
216
    #
217
    System('--NoShell', '--Exit', 'java', '-jar', 
218
           catdir($JATS_RN, 'saxon9he.jar'), 
219
           '-xsl:' . catdir($JATS_RN, 'merge.xslt'),
220
           "-s:$opt_release_note",
221
           'fileList=' . join(',', @filesList),
222
           '-o:' . 'built.files.releasenote.xml'
223
            );
224
 
225
    #
226
    #   Generate the HTML Release Note
227
    #   Output directly to the body of the package
228
    #
229
    System('--NoShell', '--Exit', 'java', '-jar', 
230
           catdir($JATS_RN, 'saxon9he.jar'), 
231
           '-xsl:' . catdir($JATS_RN, 'releaseNote2html.xslt'),
232
           '-s:' . 'built.files.releasenote.xml',
233
           "-o:" . catdir($DPKG_DOC, $opt_outname)
234
            );
235
 
236
    #
237
    #   Transfer the XML database directly into the package
238
    #
4619 dpurdie 239
    unless( File::Copy::copy('built.files.releasenote.xml', $opt_outputXml) )
4455 dpurdie 240
    {
4619 dpurdie 241
        Error("Cannot transfer XML release note", $!, $opt_outputXml);
4455 dpurdie 242
    }
243
 
244
    #
4619 dpurdie 245
    #   Delete the built.files.xxx.xml that may be present in the root of the package
246
    #   These are no longer needed - they have been incorporated into the release_note.xml file
247
    #
248
    foreach my $item ( glob(catdir($DPKG_ROOT, 'built.files.*.xml'))) {
249
        unlink $item;
250
    }
251
 
252
    #
4550 dpurdie 253
    #   Update the Release Manager entry - File Data
254
    #
255
    if ($opt_updateRmFiles)
256
    {
257
        updateRmFiles();
258
        updateRmNoteInfo();
259
    }
260
 
261
    #
4455 dpurdie 262
    #   All done
263
    #
4546 dpurdie 264
    Verbose ("Release Note:", DisplayPath(catdir($DPKG_DOC, $opt_outname)));
4455 dpurdie 265
    exit 0;
266
}
267
 
268
#-------------------------------------------------------------------------------
269
# Function        : processReleaseNote 
270
#
4546 dpurdie 271
# Description     : Extract essential information from the Release Note Data
4455 dpurdie 272
#
273
# Inputs          : 
274
#
4546 dpurdie 275
# Returns         : Populates global variables 
4455 dpurdie 276
#
277
sub processReleaseNote
278
{
279
    my $xml = XMLin($opt_release_note);
280
 
281
    foreach my $item ( qw (name version pvid) ) {
282
        Error("Unexpected ReleaseNote format: package $item")
283
            unless (exists $xml->{package}{$item});
284
    }
285
 
286
    $opt_pname = $xml->{package}{name};
287
    $opt_pversion = $xml->{package}{version};
288
    $opt_pvid = $xml->{package}{pvid};
289
 
290
    Verbose("Package Name: $opt_pname") ;
291
    Verbose("Package Version: $opt_pversion") ;
292
    Verbose("Package Pvid: $opt_pvid") ;
293
}
294
 
4546 dpurdie 295
#-------------------------------------------------------------------------------
296
# Function        : generateFileList
297
#                   generateFileListProc 
298
#
299
# Description     : A fileList has not been found in the target package
300
#                   Perhaps the package was not created by the build system
301
#                   
302
#                   Generate a fileList        
303
#
304
# Inputs          : None
305
#
306
# Returns         : Path to the generated file list
307
#
308
my @generateFileListData;
309
my $baseLength;
310
sub generateFileList
311
{
312
    my $outXmlFile;
313
    Verbose("Generate internal filelist - none found in package");
4455 dpurdie 314
 
4546 dpurdie 315
    #
316
    #   Scan the package and process each file
317
    #
318
    $baseLength = length($DPKG_ROOT);
319
    File::Find::find( \&generateFileListProc, $DPKG_ROOT );
320
 
321
    #
322
    #   Write out XML of the Generated file list
323
    #
324
    my $data;
325
    $data->{file} = \@generateFileListData;
326
 
327
    #
328
    #   Write out sections of XML
329
    #       Want control over the output order
330
    #       Use lots of attributes and only elements for arrays
331
    #       Save as one attribute per line - for readability
332
    #
4612 dpurdie 333
    $outXmlFile = catdir($OUT_ROOT,"built.files.$GBE_HOSTNAME.xml");
4546 dpurdie 334
 
335
    Verbose2('Meta File', $outXmlFile);
336
    my $xs = XML::Simple->new( NoAttr =>0, AttrIndent => 1 );
337
 
338
    open (my $XML, '>', $outXmlFile) || Error ("Cannot create output file: $outXmlFile", $!);
339
    $xs->XMLout($data, 
340
                'RootName' => 'files', 
341
                'XMLDecl'  => '<?xml version="1.0" encoding="UTF-8"?>',
342
                'OutputFile' => $XML);
343
    close $XML;
344
 
345
    return $outXmlFile;
346
}
347
 
348
sub generateFileListProc
349
{
350
    my %data;
351
    my $md5sum;
352
    my $source = $File::Find::name;
353
    my $type = 'dir';
354
 
355
    my $target = substr($source, $baseLength);
356
    $target =~ s~^/~~;
357
    $target =~ s~/$~~;
358
    Verbose2("GenFileList: $source, $target");
359
    return if (length ($target) == 0);
360
 
361
    if (-l $source)
362
    {
363
        $type = 'link';
364
    }
365
    elsif ( -f $source)
366
    {
367
        $type = 'file';
368
        Verbose2("Calculate MD5 Digest: $source");
369
        open(my $fh , $source) or Error ("Can't open '$source': $!");
370
        binmode $fh, ':crlf';
371
        $md5sum = Digest::MD5->new->addfile($fh)->hexdigest;
372
        close $fh;
373
    }
374
 
375
 
376
    if (-d $source)
377
    {
378
        $data{path} = $target;
379
    }
380
    else
381
    {
382
        $data{path} = StripFileExt($target);
383
        $data{name} = StripDir($target);
384
        if (defined $md5sum)
385
        {
386
            $data{size} = (stat($source))[7];
387
            $data{md5sum} = $md5sum;
388
        }
389
    }
390
 
391
    $data{fullname} = $target;
392
    $data{type} = $type;
393
    $data{machtype} = 'unknown';
394
    $data{host} = $GBE_HOSTNAME;
395
 
396
    # Put a nice '/' on the end of the patch elements
397
    $data{path} .= '/'
398
        if ( exists ($data{path}) && length($data{path}) > 0);
399
 
400
    push @generateFileListData, \%data;
401
}
402
 
4550 dpurdie 403
#-------------------------------------------------------------------------------
404
# Function        : updateRmFiles 
405
#
406
# Description     : 
407
#
408
# Inputs          : 
409
#
410
# Returns         : 
411
#
412
my $RM_DB;
413
my  $updateRmFilesData;
414
sub updateRmFiles
415
{
416
    my $eCount = 0;
417
    #
418
    #   If in use the the autobuilder - which it should be, then
4612 dpurdie 419
    #   modify the user name to access RM with a proxy user. This is the
420
    #   same method used in the 'buildtool'
4550 dpurdie 421
    #
4612 dpurdie 422
    if ($ENV{GBE_ABT} && $ENV{GBE_RM_USERNAME} && $ENV{GBE_RM_USERNAME} !~ m~]$~ )
4550 dpurdie 423
    {
4612 dpurdie 424
        Verbose("Access RM database as proxy user");
4550 dpurdie 425
        $ENV{GBE_RM_USERNAME} = $ENV{GBE_RM_USERNAME} . '[release_manager]'; 
426
    }
427
 
428
    #
429
    #   Read in the release note data base
430
    #
431
    my $rnDataBase = catdir($DPKG_DOC, 'release_note.xml');
432
    if (! -f $rnDataBase )
433
    {
434
        Error("Release Note XML database not found: $!", $rnDataBase);
435
    }
436
    my $xml = XMLin($rnDataBase);
437
 
438
    #
439
    #   Sanity Test the data
440
    #
441
    Error("Sanity Check Failure. PVID") unless($opt_pvid eq $xml->{package}{pvid});
442
    Error("Sanity Check Failure. Name") unless($opt_pname eq $xml->{package}{name});
443
    Error("Sanity Check Failure. Version") unless($opt_pversion eq $xml->{package}{version});
444
    Error("Sanity Check Failure. File Section") unless(exists $xml->{files}{file});
4618 dpurdie 445
    #DebugDumpData("XML DATA", \$xml);
4550 dpurdie 446
 
447
    #
448
    #   Delete any existing entry(s)
449
    #
450
    updateRmFilesDelete();
451
 
452
    #
453
    #   Scan each entry and pump required data into the RM Database
4618 dpurdie 454
    #   The {files}{file} may be either an array or a hash XMLin appears to
455
    #   make some decision as to which it will be, and I can't control it
4550 dpurdie 456
    #
4618 dpurdie 457
    #   When it does happen the hash key is the 'name' element
458
    #
459
    if (ref($xml->{files}{file}) eq 'HASH')
460
    {
461
        Verbose("Convert file hash to an array");
462
        my @nowArray;
463
        foreach my $name ( keys %{$xml->{files}{file}})
464
        {
465
            my $entry = $xml->{files}{file}{$name};
466
            $entry->{name} = $name;
467
            push @nowArray, $entry;
468
        }
469
        $xml->{files}{file} = \@nowArray
470
    }
471
    Error("Sanity Check Failure. File Section not an ARRAY") unless(ref($xml->{files}{file}) eq 'ARRAY');
472
 
473
    #
474
    #   Release Manager Database will barf if there are duplicate entries
475
    #   Maintain a hash of items processed, and only process each once
476
    #
477
    my %fullNameSeen;
478
 
4550 dpurdie 479
    $updateRmFilesData = ""; 
480
    foreach my $entry (@{$xml->{files}{file}})
481
    {
482
        #
4619 dpurdie 483
        #   Ignore 'merge' entries
484
        #
485
        next if ((exists $entry->{type}) && ($entry->{type} eq 'merge'));
486
        #
4550 dpurdie 487
        #   Clean up the data
488
        #
489
        my $fname = $entry->{name} || '';
490
        my $fpath  = $entry->{path} || '';
491
        my $fsize  = $entry->{size} || 0;
492
        my $fmd5  = $entry->{md5sum} || '';
493
        $fpath =~ s~/$~~ unless $fname;
494
 
4618 dpurdie 495
        unless( $fullNameSeen{$fpath}{$fname} )
496
        {
497
            $fullNameSeen{$fpath}{$fname} = 1;
4550 dpurdie 498
 
4618 dpurdie 499
            #
500
            #   Create SQL fragment for the insert
501
            #
502
            $eCount++;
503
            my $entry = " INTO release_manager.release_components ( pv_id, file_name, file_path, byte_size, crc_cksum, crc_modcrc ) " .
504
                        " VALUES ( $opt_pvid, '$fname', '$fpath',$fsize , '$fmd5', '')";
505
            $updateRmFilesData .= $entry;
506
 
507
            # The size of the aggregation is key to performance
508
            # Too big is as bad as too small
509
            if (length($updateRmFilesData) > 10000)
510
            {
511
                updateRmFilesInsert();
512
            }
513
        }
514
        else
4550 dpurdie 515
        {
4618 dpurdie 516
            Warning("Multiple file entries for: $fpath $fname");
4550 dpurdie 517
        }
518
    }
519
    updateRmFilesInsert();
520
    Verbose ("Inserted $eCount entries into Release_Components");
521
}
522
 
4455 dpurdie 523
#-------------------------------------------------------------------------------
4550 dpurdie 524
# Function        : updateRmFilesInsert 
525
#
526
# Description     : Insert entries using the partial SQL statement 
527
#                   Must be called when the partial SQL buffer get large
528
#                   as well as at the end to fluch any outstanding inserts
529
#
530
# Inputs          : 
531
#
532
# Returns         : 
533
#
534
sub updateRmFilesInsert
535
{
536
    if (length($updateRmFilesData) > 0)
537
    {
538
        executeRmQuery(
539
            'updateRmFilesInsert',
540
            'INSERT ALL' .$updateRmFilesData . ' SELECT 1 FROM DUAL'
541
            );
542
 
543
        $updateRmFilesData = ""; 
544
    }
545
}
546
#-------------------------------------------------------------------------------
547
# Function        : updateRmFilesDelete 
548
#
549
# Description     : Delete ALL entires in the 'release_components' table associated
550
#                   with the current pvid
551
#                   
552
#                   Needs to be done before new entries are added.    
553
#
554
# Inputs          : 
555
#
556
# Returns         : 
557
#
558
sub updateRmFilesDelete
559
{
560
    executeRmQuery(
561
        'updateRmFilesDelete',
4612 dpurdie 562
        'delete from release_manager.release_components where pv_id=' . $opt_pvid
4550 dpurdie 563
        );
564
}
565
 
566
#-------------------------------------------------------------------------------
567
# Function        : updateRmNoteInfo 
568
#
569
# Description     : Insert Release Note Info into the Release Manager Database
570
#                   This has the side effect that RM will see the Release Note
571
#                   as being fully generated.
572
#
573
# Inputs          : 
574
#
575
# Returns         : 
576
#
577
sub updateRmNoteInfo
578
{
579
    #
580
    #   Determine the path to the Release Note in a form that is suitable for the Release Manager
581
    #   Database. This expects: /dpkg_archive/PkgName/PkgVer/doc/pkgFileName
582
    #
583
    my $rnPath = join('/', '', 'dpkg_archive', $opt_pname, $opt_pversion, 'doc', $opt_outname);
584
    Verbose("RN_INFO:", $rnPath);
585
 
586
    # Into the database
587
    executeRmQuery (
588
        'updateRmNoteInfo', 
589
        'update release_manager.package_versions set release_notes_info=\'' . $rnPath . '\' where pv_id=' . $opt_pvid
590
        );
591
}
592
 
593
#-------------------------------------------------------------------------------
594
# Function        : executeRmQuery 
595
#
596
# Description     : Execute a simple RM query. One that does not expect any return data
597
#
598
# Inputs          : $fname           - OprName, for error reporting
599
#                   $m_sqlstr        - SQL String
600
#
601
# Returns         : Will exit on error
602
#
603
sub executeRmQuery
604
{
605
    my ($fname, $m_sqlstr) = @_;
606
 
607
    #
608
    #   Connect to the Database - once
609
    #
610
    connectRM(\$RM_DB, 0) unless $RM_DB;
611
 
4552 dpurdie 612
    Verbose2('ExecuteQuery:', $fname);
4550 dpurdie 613
    #
614
    #   Create the full SQL statement
615
    #
616
    my $sth = $RM_DB->prepare($m_sqlstr);
617
    if ( defined($sth) )
618
    {
619
        if ( $sth->execute() )
620
        {
621
            $sth->finish();
622
        }
623
        else
624
        {
625
            Error("$fname: Execute failure: $m_sqlstr", $sth->errstr() );
626
        }
627
    }
628
    else
629
    {
630
        Error("$fname: Prepare failure");
631
    }
632
}
633
 
634
 
635
#-------------------------------------------------------------------------------
4455 dpurdie 636
#   Documentation
637
#
638
 
639
=pod
640
 
641
=for htmltoc    SYSUTIL::
642
 
643
=head1 NAME
644
 
4550 dpurdie 645
jats_gen_releasenote - Generate a Release Note
4455 dpurdie 646
 
647
=head1 SYNOPSIS
648
 
4550 dpurdie 649
 jats jats_gen_releasenote [options]
4455 dpurdie 650
 
651
 Options:
652
    -help              - Brief help message
653
    -help -help        - Detailed help message
654
    -man               - Full documentation
655
    -verbose           - Display additional progress messages
656
    -outfile=name      - [Optional] Name of the output XML file
4468 dpurdie 657
    -archive=name      - [Optional] Name package archive
658
    -releasenote=path  - Path to the Release Note Data
4550 dpurdie 659
    -UpdateRmFiles     - Update the Files list in Release Manager
4455 dpurdie 660
 
661
 
662
=head1 OPTIONS
663
 
664
=over 8
665
 
666
=item B<-help>
667
 
668
Print a brief help message and exits.
669
 
670
=item B<-help -help>
671
 
672
Print a detailed help message with an explanation for each option.
673
 
674
=item B<-man>
675
 
676
Prints the manual page and exits.
677
 
678
=item B<-pvid=nn>
679
 
680
This option provides identifies the PackageVersion to be processed.
681
 
682
This option is mandatory.
683
 
684
=item B<-outfile=name>
685
 
686
This option specifies the output file name.
687
 
688
If not provided by the user the output filename will be created in the current directory
689
and it will be named after the package name and package version.
690
 
691
If the filename does not end in .xml, then .xml will be appended to the file name.
692
 
4550 dpurdie 693
=item B<-UpdateRmFiles>
694
 
695
This option will case the utility to ppdate the Files list in Release Manager.
696
 
4619 dpurdie 697
The existing file list will be replaced by the one within the package.
4550 dpurdie 698
 
699
Note: Write Access to Release Manager is required.
700
 
4455 dpurdie 701
=back
702
 
703
=head1 DESCRIPTION
704
 
705
This utility program is used to extract sufficient information from Release Manager and other
706
associated databases so that a Release Note can be created.
707
 
708
The extracted data is stored in an XML format. The intent is that XSLT will be used to create
709
an HTML based release note.
710
 
711
 
712
=head1 EXAMPLE
713
 
4619 dpurdie 714
=head2 jats jats_gen_releasenote -releasenote=/tmp/myreleasenote.xml
4455 dpurdie 715
 
4619 dpurdie 716
This will process release note data in the specified XML file.
4455 dpurdie 717
 
718
=cut