Subversion Repositories DevTools

Rev

Rev 365 | Rev 2054 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 365 Rev 1329
Line 52... Line 52...
52
#
52
#
53
my $opt_debug   = $ENV{'GBE_DEBUG'};        # Allow global debug
53
my $opt_debug   = $ENV{'GBE_DEBUG'};        # Allow global debug
54
my $opt_verbose = $ENV{'GBE_VERBOSE'};      # Allow global verbose
54
my $opt_verbose = $ENV{'GBE_VERBOSE'};      # Allow global verbose
55
my $opt_help = 0;                           # Help level
55
my $opt_help = 0;                           # Help level
56
my $opt_exact = 0;                          # Exact (escrow) build
56
my $opt_exact = 0;                          # Exact (escrow) build
-
 
57
my $opt_toPackage;                          # Control recursion
-
 
58
my $opt_fromPackage;                        # Control recursion
-
 
59
my @opt_justPackage;                        # Control recursion
-
 
60
my @opt_ignorePackage;                      # Control recursion
57
 
61
 
58
#
62
#
59
#   Globals - Provided by the JATS environment
63
#   Globals - Provided by the JATS environment
60
#
64
#
61
my $USER         = $ENV{'USER'};
65
my $USER         = $ENV{'USER'};
Line 72... Line 76...
72
my $GBE_DPKG_STORE = $ENV{'GBE_DPKG_STORE'};
76
my $GBE_DPKG_STORE = $ENV{'GBE_DPKG_STORE'};
73
 
77
 
74
#
78
#
75
#   Globals
79
#   Globals
76
#
80
#
-
 
81
my @stopped = ();                         # Stopped entries
77
my @build_order = ();                     # Build Ordered list of entries
82
my @build_order = ();                     # Build Ordered list of entries
78
my %extern_deps;                          # Hash of external dependencies
83
my %extern_deps;                          # Hash of external dependencies
79
my %packages;                             # Hash of packages
84
my %packages;                             # Hash of packages
80
 
85
 
81
 
86
 
Line 84... Line 89...
84
#
89
#
85
# Description     :
90
# Description     :
86
#
91
#
87
# Inputs          :
92
# Inputs          :
88
#
93
#
89
my $result = GetOptions (
-
 
90
                "help|h:+"      => \$opt_help,
-
 
91
                "manual:3"      => \$opt_help,
-
 
92
                "verbose:+"     => \$opt_verbose,           # flag, multiple use allowed
-
 
93
                );
-
 
94
 
-
 
95
                #
-
 
96
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
-
 
97
                #
-
 
98
 
94
 
99
#
95
#
100
#   Process help and manual options
96
#   Process help and manual options
101
#
97
#
-
 
98
my $result = getOptionsFromArray ( \@ARGV );
102
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result);
99
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result);
103
pod2usage(-verbose => 1)  if ($opt_help == 2 );
100
pod2usage(-verbose => 1)  if ($opt_help == 2 );
104
pod2usage(-verbose => 2)  if ($opt_help > 2 );
101
pod2usage(-verbose => 2)  if ($opt_help > 2 );
105
 
102
 
106
#
103
#
Line 229... Line 226...
229
#
226
#
230
# Returns         : Will exit
227
# Returns         : Will exit
231
#
228
#
232
sub info
229
sub info
233
{
230
{
234
    GetOptions (
231
    my (@cmd_opts ) = @_;
235
                "help:+"        => \$opt_help,
232
    my $show = 0;
236
                "manual:3"      => \$opt_help,
-
 
237
                "verbose:+"     => \$opt_verbose,
-
 
238
                ) || Error ("Invalid command line" );
-
 
239
 
233
 
-
 
234
    Getopt::Long::Configure('pass_through');
-
 
235
    getOptionsFromArray ( \@cmd_opts,
-
 
236
                           'verbose:+'  => \$show,
-
 
237
                        ) || Error ("Invalid command line" );
240
    SubCommandHelp( $opt_help, "Sandbox Information") if ($opt_help || $#ARGV >=0 );
238
    SubCommandHelp( $opt_help, "Sandbox Information") if ($opt_help || $#cmd_opts >=0 );
241
 
239
 
242
    #
240
    #
243
    #   Determine Sandbox information
241
    #   Determine Sandbox information
244
    #   Populate global variables
242
    #   Populate global variables
245
    #
243
    #
246
    calc_sandbox_info();
244
    calc_sandbox_info(1);
247
 
245
 
248
    #
246
    #
249
    #   Display information
247
    #   Display information
250
    #
248
    #
251
    Message ("Type   : " . ($opt_exact ? 'Exact' : 'Development') );
249
    Message ("Type   : " . ($opt_exact ? 'Exact' : 'Development') );
252
    Message ("Base   : $GBE_SANDBOX");
250
    Message ("Base   : $GBE_SANDBOX");
253
    Message ("Archive: $GBE_DPKG_SBOX");
251
    Message ("Archive: $GBE_DPKG_SBOX");
254
 
252
 
-
 
253
 
255
    Message ("Build Order");
254
    Message ("Build Order");
-
 
255
    foreach my $pname ( @stopped )
-
 
256
    {
-
 
257
        Message( "    Level:" . "-"  . " Name: " . $pname . ' (Stopped)');
-
 
258
    }
256
    foreach my $fe ( @build_order )
259
    foreach my $fe ( @build_order )
257
    {
260
    {
258
        Message( "    Level:" . $fe->{level} . " Name: " . $fe->{dname} );
261
        Message( "    Level:" . $fe->{level} . " Name: " . $fe->{dname} . ($fe->{buildActive} ? '' : ' (Build Suppressed)'));
259
        Message( DisplayPath ("        Path: $fe->{dir}" )) if $opt_verbose;
262
        Message( DisplayPath ("        Path: $fe->{dir}" )) if $show;
260
 
263
 
261
        if ( $opt_verbose )
264
        if ( $show )
262
        {
265
        {
263
            foreach my $idep ( sort values %{$fe->{'ideps'}} )
266
            foreach my $idep ( sort values %{$fe->{'ideps'}} )
264
            {
267
            {
265
                Message ("        I:$idep");
268
                Message ("        I:$idep");
266
            }
269
            }
Line 288... Line 291...
288
        {
291
        {
289
            my ($pn,$pv) = split( $; , $pve );
292
            my ($pn,$pv) = split( $; , $pve );
290
            my $exists = check_package_existance($pn,$pv  ) ? '' : '*';
293
            my $exists = check_package_existance($pn,$pv  ) ? '' : '*';
291
            my $flags = sprintf ("%4.4s", $flag . $exists);
294
            my $flags = sprintf ("%4.4s", $flag . $exists);
292
            Message ("${flags}${pn} ${pv}");
295
            Message ("${flags}${pn} ${pv}");
293
            if ( $opt_verbose )
296
            if ( $show )
294
            {
297
            {
295
                foreach my $pkg ( @{$extern_deps{$de}{$pve}} )
298
                foreach my $pkg ( @{$extern_deps{$de}{$pve}} )
296
                {
299
                {
297
                    my $ppn = join ('.', split( $; , $pkg));
300
                    my $ppn = join ('.', split( $; , $pkg));
298
                    Message ("        U:$ppn");
301
                    Message ("        U:$ppn");
Line 300... Line 303...
300
            }
303
            }
301
 
304
 
302
        }
305
        }
303
    }
306
    }
304
 
307
 
305
    if ( $opt_verbose > 2 )
308
    if ( $show > 2 || $opt_verbose > 2 )
306
    {
309
    {
307
        DebugDumpData( "extern_deps", \%extern_deps);
310
        DebugDumpData( "extern_deps", \%extern_deps);
308
        DebugDumpData( "build_order", \@build_order);
311
        DebugDumpData( "build_order", \@build_order);
309
        DebugDumpData( "packages", \%packages);
312
        DebugDumpData( "packages", \%packages);
310
    }
313
    }
Line 348... Line 351...
348
# Function        : calc_sandbox_info
351
# Function        : calc_sandbox_info
349
#
352
#
350
# Description     : Examine the sandbox and determine all the important
353
# Description     : Examine the sandbox and determine all the important
351
#                   information
354
#                   information
352
#
355
#
-
 
356
#                   Operation will be modified by
353
# Inputs          : None
357
#                       $opt_toPackage
-
 
358
#                       $opt_fromPackage
-
 
359
#                       @opt_justPackage
-
 
360
#                       @opt_ignorePackage
-
 
361
#
-
 
362
# Inputs          : info                - True: Just for info
-
 
363
#                                               Keep supressed packages
354
#
364
#
355
# Returns         : Will exit if not in a sandbox
365
# Returns         : Will exit if not in a sandbox
356
#                   Populates global variables
366
#                   Populates global variables
357
#                       @build_order - build ordered array of build entries
367
#                       @build_order - build ordered array of build entries
358
#
368
#
359
sub calc_sandbox_info
369
sub calc_sandbox_info
360
{
370
{
-
 
371
    my ($info) = @_;
-
 
372
 
361
    #
373
    #
362
    #   Start from the root of the sandbox
374
    #   Start from the root of the sandbox
363
    #
375
    #
364
    Error ("Command must be executed from within a Sandbox") unless ( $GBE_SANDBOX );
376
    Error ("Command must be executed from within a Sandbox") unless ( $GBE_SANDBOX );
365
    chdir ($GBE_SANDBOX) || Error ("Cannot chdir to $GBE_SANDBOX");
377
    chdir ($GBE_SANDBOX) || Error ("Cannot chdir to $GBE_SANDBOX");
Line 378... Line 390...
378
        next unless ( -d $pname );
390
        next unless ( -d $pname );
379
        Verbose ("Package discovered: $pname");
391
        Verbose ("Package discovered: $pname");
380
 
392
 
381
        if ( -f "$pname/stop" || -f "$pname/stop.$GBE_MACHTYPE" )
393
        if ( -f "$pname/stop" || -f "$pname/stop.$GBE_MACHTYPE" )
382
        {
394
        {
-
 
395
            push @stopped, $pname;
383
            Warning("Package contains stop file: $pname");
396
            Warning("Package contains stop file: $pname");
384
            next;
397
            next;
385
        }
398
        }
386
 
399
 
387
        push @dirlist, $pname;
400
        push @dirlist, $pname;
Line 410... Line 423...
410
    my %depends;
423
    my %depends;
411
    my %multi;
424
    my %multi;
412
    foreach my $be ( @build_list )
425
    foreach my $be ( @build_list )
413
    {
426
    {
414
        Verbose( DisplayPath ("Build file: " . $be->{dir} . " Name: " . $be->{file} ));
427
        Verbose( DisplayPath ("Build file: " . $be->{dir} . " Name: " . $be->{file} ));
415
 
-
 
416
        #
428
        #
417
        #   Sandbox vs Exact processing
429
        #   Sandbox vs Exact processing
418
        #       Set a suitable display name
430
        #       Set a suitable display name
419
        #       Set a suitable tag
431
        #       Set a suitable tag
420
        #
432
        #
Line 431... Line 443...
431
        push @{$multi{$be->{dname}}},$be->{dir};
443
        push @{$multi{$be->{dname}}},$be->{dir};
432
 
444
 
433
        #
445
        #
434
        #   Add into dependency struct
446
        #   Add into dependency struct
435
        #
447
        #
436
        $depends{$be->{tag}}{entry} = $be;
448
        $depends{$be->{tag}} = $be;
437
        $depends{$be->{tag}}{depends} = $be->{depends};
-
 
438
    }
449
    }
439
 
450
 
440
    foreach my $dname ( sort keys %multi )
451
    foreach my $dname ( sort keys %multi )
441
    {
452
    {
442
        ReportError ("Multiple builders for : $dname", @{$multi{$dname}} )
453
        ReportError ("Multiple builders for : $dname", @{$multi{$dname}} )
Line 455... Line 466...
455
 
466
 
456
    #
467
    #
457
    #   Remove any dependencies to 'external' packages
468
    #   Remove any dependencies to 'external' packages
458
    #   These will not be met internally and can be regarded as constant
469
    #   These will not be met internally and can be regarded as constant
459
    #
470
    #
-
 
471
    #   Split 'depends' into internal (ideps) and external (edeps)
-
 
472
    #       edeps : External Dependencies
-
 
473
    #               Key:        Name;Version
-
 
474
    #               Value:      'tag' - index into packages
-
 
475
    #       ideps : Internal Dependencies
-
 
476
    #               Key:        'tag'   - Index into packages
-
 
477
    #               Value:      'dname' - Display Name
-
 
478
    #
460
    foreach my $key ( keys %depends )
479
    foreach my $key ( keys %depends )
461
    {
480
    {
462
        foreach my $build ( keys( %{$depends{$key}{depends}} ))
481
        foreach my $build ( keys( %{$depends{$key}{depends}} ))
463
        {
482
        {
464
            unless (exists $depends{$build})
483
            unless (exists $depends{$build})
465
            {
484
            {
466
                push @{$extern_deps{$build} {$depends{$key}{depends}{$build}} }, $key;
-
 
467
 
-
 
468
                $depends{$key}{entry}{'edeps'}{$depends{$key}{depends}{$build}} = 1;
485
                $depends{$key}{'edeps'}{$depends{$key}{depends}{$build}} = $build;
469
                delete ($depends{$key}{depends}{$build}) ;
486
                delete ($depends{$key}{depends}{$build}) ;
470
                Verbose2( "Not in set: $build");
487
                Verbose2( "Not in set: $build");
471
            }
488
            }
472
            else
489
            else
473
            {
490
            {
474
                $depends{$key}{entry}{'ideps'}{$build} = $depends{$build}{entry}{dname};
491
                $depends{$key}{'ideps'}{$build} = $depends{$build}{dname};
475
            }
492
            }
476
        }
493
        }
477
    }
494
    }
478
 
495
 
479
#DebugDumpData ("depends", \%depends );
496
#DebugDumpData ("depends", \%depends );
480
#DebugDumpData ("External Depends", \%extern_deps );
-
 
481
 
497
 
482
 
498
 
483
    #
499
    #
484
    #   Determine package build order
500
    #   Determine package build order
485
    #       Scan the list of packages in the build set and determine
501
    #       Scan the list of packages in the build set and determine
486
    #       those with no dependencies. These can be built.
502
    #       those with no dependencies. These can be built.
487
    #       Remove those packages as dependents from all packages
503
    #       Remove those packages as dependents from all packages
488
    #       Repeat.
504
    #       Repeat.
489
    #
505
    #
-
 
506
    my %found    = map { $_ => 1 } @opt_ignorePackage;
-
 
507
    my %notFound = map { $_ => 1 } @opt_justPackage;
-
 
508
    my $scan_start = 0;
-
 
509
    my $scan_stop = 0;
-
 
510
    my $scan_active = ($opt_fromPackage) ? 0 : 1;
-
 
511
    $scan_active = 0 if ( !$opt_fromPackage && !$opt_fromPackage && !@opt_ignorePackage && @opt_justPackage );
-
 
512
 
490
    while ( $more )
513
    while ( $more )
491
    {
514
    {
492
        $more = 0;
515
        $more = 0;
493
        $level++;
516
        $level++;
494
        my @build;
517
        my @build;
Line 503... Line 526...
503
        }
526
        }
504
 
527
 
505
        foreach my $build ( @build )
528
        foreach my $build ( @build )
506
        {
529
        {
507
            $more = 1;
530
            $more = 1;
508
            my $fe = $depends{$build}{entry};
531
            my $fe = $depends{$build};
-
 
532
            my $scan_add = $scan_active ? 1 : 0;
-
 
533
 
-
 
534
            if ( $opt_fromPackage && (($fe->{mname} eq $opt_fromPackage) || ($fe->{name} eq $opt_fromPackage)))
-
 
535
            {
-
 
536
                $scan_add = 1;
-
 
537
                $scan_active = 1;
-
 
538
                $scan_start = 1;
-
 
539
            }
-
 
540
 
-
 
541
            if ( $opt_toPackage && (($fe->{mname} eq $opt_toPackage) || ($fe->{name} eq $opt_toPackage)))
-
 
542
            {
-
 
543
                $scan_add = 0;
-
 
544
                $scan_active = 0;
-
 
545
                $scan_stop = 1;
-
 
546
            }
-
 
547
 
-
 
548
            if ( @opt_justPackage )
-
 
549
            {
-
 
550
                foreach my $pname ( @opt_justPackage )
-
 
551
                {
-
 
552
                    if ( (($fe->{mname} eq $pname) || ($fe->{name} eq $pname)))
-
 
553
                    {
-
 
554
                        $scan_add = 1;
-
 
555
                        delete $notFound{$pname};
-
 
556
                    }
-
 
557
                }
-
 
558
            }
-
 
559
            
-
 
560
            if ( @opt_ignorePackage )
-
 
561
            {
-
 
562
                foreach my $pname ( @opt_ignorePackage )
-
 
563
                {
-
 
564
                    if ( (($fe->{mname} eq $pname) || ($fe->{name} eq $pname)))
-
 
565
                    {
-
 
566
                        $scan_add = 0;
-
 
567
                        delete $found{$pname};
-
 
568
                    }
-
 
569
                }
-
 
570
            }
-
 
571
 
509
            $fe->{level} = $level;
572
            $fe->{level} = $level;
-
 
573
            $fe->{buildActive} = $scan_add;
510
            $packages{$build} = $fe;
574
            $packages{$build} = $fe;
511
            push @build_order, $fe;
575
            push (@build_order, $fe) if ( $scan_add || $info );
512
            delete $depends{$build};
576
            delete $depends{$build};
513
            delete $fe->{depends};                          # remove now its not needed
577
            delete $fe->{depends};                          # remove now its not needed
514
        }
578
        }
515
 
579
 
516
        foreach my $key ( keys %depends )
580
        foreach my $key ( keys %depends )
Line 521... Line 585...
521
            }
585
            }
522
        }
586
        }
523
    }
587
    }
524
 
588
 
525
    #
589
    #
-
 
590
    #   Detect bad user specifications
-
 
591
    #
-
 
592
    ReportError ("Specified FromPackage not found: $opt_fromPackage") if ( $opt_fromPackage && !$scan_start );
-
 
593
    ReportError ("Specified ToPackage not found: $opt_toPackage") if ( $opt_toPackage && !$scan_stop );
-
 
594
    ReportError ("Specified ExactPackages not found: ", keys( %notFound) ) if ( %notFound );
-
 
595
    ReportError ("Specified IgnorePackages not found: ", keys( %found) ) if ( %found );
-
 
596
    ErrorDoExit();
-
 
597
 
-
 
598
    #
-
 
599
    #   Calculate the external dependencies
-
 
600
    #       Only process packages that are a part of the build
-
 
601
    #
-
 
602
    #   extern_deps structure
-
 
603
    #       Hash key: 'tag'   - Index into packages
-
 
604
    #          Value: Hash of:
-
 
605
    #                 Key  : Name;Version
-
 
606
    #                 Value: Array of: 'tags' (Index into packages)
-
 
607
    #                                   of packages that use the external
-
 
608
    #                                   component.
-
 
609
    {
-
 
610
        Verbose ("Calculate external dependencies");
-
 
611
        %extern_deps = ();
-
 
612
 
-
 
613
        foreach my $key ( keys %packages )
-
 
614
        {
-
 
615
                next unless ( $packages{$key}{buildActive} );
-
 
616
                next unless ( $packages{$key}{'edeps'} );
-
 
617
                foreach ( keys %{$packages{$key}{'edeps'}} )
-
 
618
                {
-
 
619
                    push @{$extern_deps{$packages{$key}{'edeps'}{$_}} {$_} }, $key;
-
 
620
                }
-
 
621
        }
-
 
622
    }
-
 
623
 
-
 
624
    #
526
    #   Just to be sure to be sure
625
    #   Just to be sure to be sure
527
    #
626
    #
528
    if ( keys %depends )
627
    if ( keys %depends )
529
    {
628
    {
530
        #DebugDumpData ("depends", \%depends );
629
        #DebugDumpData ("depends", \%depends );
531
        Error( "Internal algorithm error: Bad dependancy walk",
630
        Error( "Internal algorithm error: Bad dependancy walk",
532
               "Possible circular dependency");
631
               "Possible circular dependency");
533
    }
632
    }
534
 
633
 
-
 
634
#   DebugDumpData("Packages", \%packages);
535
#   DebugDumpData ("Order", \@build_order);
635
#   DebugDumpData ("Order", \@build_order);
536
#   DebugDumpData("External Depends", \%extern_deps );
636
#   DebugDumpData("External Depends", \%extern_deps );
537
}
637
}
538
 
638
 
539
#-------------------------------------------------------------------------------
639
#-------------------------------------------------------------------------------
Line 550... Line 650...
550
#
650
#
551
# Returns         : Will exit
651
# Returns         : Will exit
552
#
652
#
553
sub cmd
653
sub cmd
554
{
654
{
555
    my ($hcmd, @cmds ) = @_;
655
    my ($hcmd, @cmd_opts ) = @_;
556
 
656
 
557
    Getopt::Long::Configure('pass_through');
657
    Getopt::Long::Configure('pass_through');
558
    GetOptions (
-
 
559
                "help:+"        => \$opt_help,
-
 
560
                "manual:3"      => \$opt_help,
-
 
561
                ) || Error ("Invalid command line" );
658
    getOptionsFromArray ( \@cmd_opts ) || Error ("Invalid command line" );
562
 
-
 
563
    SubCommandHelp( $opt_help, $hcmd) if ($opt_help  );
659
    SubCommandHelp( $opt_help, $hcmd) if ($opt_help  );
564
 
660
 
565
    #
661
    #
566
    #   Determine Sandbox information
662
    #   Determine Sandbox information
567
    #   Populate global variables
663
    #   Populate global variables
Line 571... Line 667...
571
    {
667
    {
572
        my $dir = $fe->{dir};
668
        my $dir = $fe->{dir};
573
        Message( "Level:" . $fe->{level} . " Name: " . $fe->{dname} ,
669
        Message( "Level:" . $fe->{level} . " Name: " . $fe->{dname} ,
574
                  DisplayPath ("        Path: $fe->{dir}" ));
670
                  DisplayPath ("        Path: $fe->{dir}" ));
575
 
671
 
576
        my $result = JatsCmd( "-cd=$dir", @cmds);
672
        my $result = JatsCmd( "-cd=$dir", @cmd_opts);
577
        Error ("Cmd failure") if ( $result );
673
        Error ("Cmd failure") if ( $result );
578
    }
674
    }
579
 
675
 
580
    exit 0;
676
    exit 0;
581
}
677
}
Line 602... Line 698...
602
 
698
 
603
    #
699
    #
604
    #   Extract and options
700
    #   Extract and options
605
    #
701
    #
606
    Getopt::Long::Configure('pass_through');
702
    Getopt::Long::Configure('pass_through');
607
    GetOptions (
-
 
608
                "help:+"        => \$opt_help,
-
 
609
                "manual:3"      => \$opt_help,
-
 
610
                ) || Error ("Invalid command line" );
703
    getOptionsFromArray ( \@cmd_opts ) || Error ("Invalid command line" );
611
 
-
 
612
    SubCommandHelp( $opt_help, "Command $cmd") if ($opt_help );
704
    SubCommandHelp( $opt_help, "Command $cmd") if ($opt_help );
613
 
705
 
614
    #
706
    #
615
    #   Insert default options
707
    #   Insert default options
616
    #
708
    #
Line 665... Line 757...
665
#
757
#
666
# Returns         : Will exit
758
# Returns         : Will exit
667
#
759
#
668
sub clean
760
sub clean
669
{
761
{
670
    my ($mode, @cmds ) = @_;
762
    my ($mode, @cmd_opts ) = @_;
671
 
763
 
672
    #
764
    #
673
    #   Extract and options
765
    #   Extract and options
674
    #
766
    #
675
    Getopt::Long::Configure('pass_through');
767
    Getopt::Long::Configure('pass_through');
676
    GetOptions (
-
 
677
                "help:+"        => \$opt_help,
-
 
678
                "manual:3"      => \$opt_help,
-
 
679
                ) || Error ("Invalid command line" );
768
    getOptionsFromArray ( \@cmd_opts ) || Error ("Invalid command line" );
680
 
-
 
681
    SubCommandHelp( $opt_help, "Clean") if ($opt_help );
769
    SubCommandHelp( $opt_help, "Clean") if ($opt_help );
682
 
770
 
683
    #
771
    #
684
    #   Determine Sandbox information
772
    #   Determine Sandbox information
685
    #   Populate global variables
773
    #   Populate global variables
Line 695... Line 783...
695
    {
783
    {
696
        my $dir = $fe->{dir};
784
        my $dir = $fe->{dir};
697
        Message( "Level:" . $fe->{level} . " Name: " . $fe->{dname} ,
785
        Message( "Level:" . $fe->{level} . " Name: " . $fe->{dname} ,
698
                  DisplayPath ("        Path: $fe->{dir}" ));
786
                  DisplayPath ("        Path: $fe->{dir}" ));
699
 
787
 
700
        my $result = JatsCmd( "-cd=$dir", @cmd, @cmds);
788
        my $result = JatsCmd( "-cd=$dir", @cmd, @cmd_opts);
701
        Error ("Cmd failure") if ( $result );
789
        Error ("Cmd failure") if ( $result );
702
    }
790
    }
703
 
791
 
704
    exit 0;
792
    exit 0;
705
}
793
}
Line 714... Line 802...
714
#
802
#
715
# Returns         : Nothing
803
# Returns         : Nothing
716
#
804
#
717
sub cache
805
sub cache
718
{
806
{
719
    my (@opts) = @_;
807
    my (@cmd_opts) = @_;
720
 
808
 
721
    GetOptions (
-
 
722
                "help:+"        => \$opt_help,
-
 
723
                "manual:3"      => \$opt_help,
-
 
724
                ) || Error ("Invalid command line" );
809
    getOptionsFromArray ( \@cmd_opts ) || Error ("Invalid command line" );
725
 
-
 
726
    SubCommandHelp( $opt_help, "Cache") if ($opt_help || $#ARGV >= 0 );
810
    SubCommandHelp( $opt_help, "Cache") if ($opt_help || $#cmd_opts >= 0 );
727
 
811
 
728
    #
812
    #
729
    #   Determine Sandbox information
813
    #   Determine Sandbox information
730
    #   Populate global variables
814
    #   Populate global variables
731
    #
815
    #
732
    Message("Cache External Dependencies");
816
    Message("Cache External Dependencies");
733
    calc_sandbox_info();
817
    calc_sandbox_info();
734
 
818
 
735
    #
819
    #
736
    #   Walk the list of external despondencies and cache each one
820
    #   Walk the list of external dependencies and cache each one
737
    #
821
    #
738
    foreach my $de ( sort keys %extern_deps )
822
    foreach my $de ( sort keys %extern_deps )
739
    {
823
    {
740
        my @vlist = keys %{$extern_deps{$de}};
824
        my @vlist = keys %{$extern_deps{$de}};
741
        foreach my $pve ( @vlist )
825
        foreach my $pve ( @vlist )
Line 783... Line 867...
783
my @StrayPackages;
867
my @StrayPackages;
784
my @PopBase;
868
my @PopBase;
785
 
869
 
786
sub populate
870
sub populate
787
{
871
{
-
 
872
    my (@cmd_opts ) = @_;
788
    my $opt_missing = 0;
873
    my $opt_missing = 0;
789
    my $opt_recurse = 0;
874
    my $opt_recurse = 0;
790
    my $opt_test = 0;
875
    my $opt_test = 0;
-
 
876
    my $opt_show = 0;
791
    my $opt_extractfiles;
877
    my $opt_extractfiles;
792
    my @opt_extract = qw(-extract);
878
    my @opt_extract = qw(-extract);
793
    my @opt_fnames;
879
    my @opt_fnames;
-
 
880
    my @opt_exclude;
-
 
881
    my $opt_all;
-
 
882
 
794
 
883
 
795
    Getopt::Long::Configure('pass_through');
884
    Getopt::Long::Configure('pass_through');
796
    GetOptions (
885
    getOptionsFromArray ( \@cmd_opts,
797
                "help:+"        => \$opt_help,
886
                "all"               => \$opt_all,
798
                "manual:3"      => \$opt_help,
887
                "missing"           => \$opt_missing,
799
                "missing"       => \$opt_missing,
888
                "test"              => \$opt_test,
800
                "test"          => \$opt_test,
889
                "show"              => \$opt_show,
801
                "recurse:100"   => \$opt_recurse,
890
                "recurse:100"       => \$opt_recurse,
-
 
891
                'excludePackage:s'  => sub{ opts_add2List( \@opt_exclude, @_ )},
802
                ) || Error ("Invalid command line" );
892
                ) || Error ("Invalid command line" );
803
 
893
 
804
    SubCommandHelp( $opt_help, "Populate Sandbox") if ($opt_help );
894
    SubCommandHelp( $opt_help, "Populate Sandbox") if ($opt_help );
805
 
895
 
806
    #
896
    #
-
 
897
    #   Sanity tests
-
 
898
    #
-
 
899
    Error ("Populate: -missing and -all options are mutually exclusive")
-
 
900
        if ( $opt_missing && $opt_all );
-
 
901
 
-
 
902
    #
807
    #   Extract options for the jats extract utility
903
    #   Extract options for the jats extract utility
808
    #
904
    #
809
    foreach ( @ARGV )
905
    foreach ( @cmd_opts )
810
    {
906
    {
811
        if ( m~^-~ ) {
907
        if ( m~^-~ ) {
812
            push ( @opt_extract, $_);
908
            push ( @opt_extract, $_);
813
        } else {
909
        } else {
814
            push ( @opt_fnames, $_);
910
            push ( @opt_fnames, $_);
Line 823... Line 919...
823
    {
919
    {
824
        Error ("Populate: Must specify both a package name and version")
920
        Error ("Populate: Must specify both a package name and version")
825
            if ( $#opt_fnames != 1 );
921
            if ( $#opt_fnames != 1 );
826
        push @PopBase, join( $;, @opt_fnames );
922
        push @PopBase, join( $;, @opt_fnames );
827
    }
923
    }
828
    elsif ( $opt_missing )
924
    elsif ( $opt_missing || $opt_all )
829
    {
925
    {
830
        #
926
        #
831
        #   User has not provided a package name to extract
927
        #   User has not provided a package name to extract
832
        #   Assume that the user will want missing dependencies
928
        #   Assume that the user will want all or missing dependencies
833
        #
929
        #
834
        #   Determine packages that are not present
930
        #   Determine packages that are not present
835
        #
931
        #
836
        calc_sandbox_info();
932
        calc_sandbox_info();
837
 
933
 
Line 842... Line 938...
842
        {
938
        {
843
            my @vlist = keys %{$extern_deps{$de}};
939
            my @vlist = keys %{$extern_deps{$de}};
844
            foreach my $pve ( @vlist )
940
            foreach my $pve ( @vlist )
845
            {
941
            {
846
                my ($pn,$pv) = split( $; , $pve );
942
                my ($pn,$pv) = split( $; , $pve );
847
                unless (check_package_existance( $pn, $pv ))
943
                unless ($opt_missing && check_package_existance( $pn, $pv ))
848
                {
944
                {
849
                    push @PopBase, join( $;, $pn , $pv );
945
                    push @PopBase, join( $;, $pn , $pv );
850
                }
946
                }
851
            }
947
            }
852
        }
948
        }
Line 875... Line 971...
875
    #   If recursing then process packages that have yet to
971
    #   If recursing then process packages that have yet to
876
    #   be processed. At the start there will be the initial user specified
972
    #   be processed. At the start there will be the initial user specified
877
    #   packages on the list. Place a marker at the end so that we can
973
    #   packages on the list. Place a marker at the end so that we can
878
    #   determine how far we are recursing down the dependency tree.
974
    #   determine how far we are recursing down the dependency tree.
879
    #
975
    #
-
 
976
    $opt_recurse = ($opt_all ? 100 : $opt_recurse);
880
    if ( $opt_recurse )
977
    if ( $opt_recurse )
881
    {
978
    {
882
        my $marker = join($; , '_NEXT_LEVEL_', 0, 0 );
979
        my $marker = join($; , '_NEXT_LEVEL_', 0, 0 );
883
        push @StrayPackages, $marker;
980
        push @StrayPackages, $marker;
884
        $PopLevel++;
981
        $PopLevel++;
Line 908... Line 1005...
908
    }
1005
    }
909
    #DebugDumpData("Data", \%PopPackage );
1006
    #DebugDumpData("Data", \%PopPackage );
910
 
1007
 
911
    #
1008
    #
912
    #   Determine packages that need to be extracted
1009
    #   Determine packages that need to be extracted
913
    #   Not ordered in any way. Could order by level if we wanted
1010
    #   Sort alphabetically - case insensitive
914
    #
1011
    #
915
    foreach my $pname ( sort keys %PopPackage )
1012
    foreach my $pname ( sort {lc($a) cmp lc($b)} keys %PopPackage )
916
    {
1013
    {
-
 
1014
        pkgscan:
917
        foreach my $pver ( sort keys %{$PopPackage{$pname}} )
1015
        foreach my $pver ( sort keys %{$PopPackage{$pname}} )
918
        {
1016
        {
919
            #
1017
            #
920
            #   Create a nice view name for the extraction
1018
            #   Create a nice view name for the extraction
921
            #   Will also be used to test for package existence
1019
            #   Will also be used to test for package existence
Line 944... Line 1042...
944
                    next;
1042
                    next;
945
                }
1043
                }
946
            }
1044
            }
947
 
1045
 
948
            #
1046
            #
-
 
1047
            #   Has the user specifically excluded this package
-
 
1048
            #   Allow three forms
-
 
1049
            #       packageName
-
 
1050
            #       packageName_Version
-
 
1051
            #       packageName.projectName
-
 
1052
            #
-
 
1053
            my $excluded;
-
 
1054
            foreach my $ename ( @opt_exclude )
-
 
1055
            {
-
 
1056
                if ( $ename eq $pname ) {
-
 
1057
                    $excluded = 1;
-
 
1058
                } elsif ($ename eq $pname .'_' . $pver ) {
-
 
1059
                    $excluded = 1;
-
 
1060
                } else {
-
 
1061
                    if ( $pver =~ m~(\.[a-z]{2,4})$~ )
-
 
1062
                    {
-
 
1063
                        $excluded = ($ename eq $pname . $1 );
-
 
1064
                    }
-
 
1065
                }
-
 
1066
 
-
 
1067
                if ( $excluded )
-
 
1068
                {
-
 
1069
                    Message ("Package excluded by user - skipped: $pname, $pver");
-
 
1070
                    next pkgscan;
-
 
1071
                }
-
 
1072
            }
-
 
1073
 
-
 
1074
            #
949
            #   Generate commands to extract the package
1075
            #   Generate commands to extract the package
950
            #
1076
            #
951
            my $vcstag = $PopPackage{$pname}{$pver}{vcstag};
1077
            my $vcstag = $PopPackage{$pname}{$pver}{vcstag};
952
            my @cmd = qw(jats_vcsrelease);
1078
            my @cmd = qw(jats_vcsrelease);
953
            push @cmd, "-view=$vname", "-label=$vcstag", @opt_extract;
1079
            push @cmd, "-view=$vname", "-label=$vcstag", @opt_extract;
-
 
1080
            if ( $opt_show )
-
 
1081
            {
-
 
1082
                Message ("$pname $pver");
-
 
1083
            }
954
            if ( $opt_test )
1084
            elsif ( $opt_test )
955
            {
1085
            {
956
                Message "jats " . QuoteCommand (@cmd );
1086
                Message "jats " . QuoteCommand (@cmd );
957
            }
1087
            }
958
            else
1088
            else
959
            {
1089
            {
Line 1133... Line 1263...
1133
        Error("GetDepends:Prepare failure" );
1263
        Error("GetDepends:Prepare failure" );
1134
    }
1264
    }
1135
}
1265
}
1136
 
1266
 
1137
#-------------------------------------------------------------------------------
1267
#-------------------------------------------------------------------------------
-
 
1268
# Function        : getOptionsFromArray
-
 
1269
#
-
 
1270
# Description     : Like getOptions, but handles an array
-
 
1271
#                   Provided as the version of Perl used does not have one
-
 
1272
#
-
 
1273
# Inputs          : pArray                  - Ref to array
-
 
1274
#                   ....                    - GetOptions arguments
-
 
1275
#
-
 
1276
# Returns         : 
-
 
1277
#
-
 
1278
sub getOptionsFromArray
-
 
1279
{
-
 
1280
    my ($pArray, %args) = @_;
-
 
1281
 
-
 
1282
    #
-
 
1283
    #   Common arguments
-
 
1284
    #
-
 
1285
    my %commonOptions = (
-
 
1286
        'help|h:+'          => \$opt_help,
-
 
1287
        'manual:3'          => \$opt_help,
-
 
1288
        'verbose:+'         => \$opt_verbose,
-
 
1289
        'topackage:s'       => \$opt_toPackage,
-
 
1290
        'frompackage:s'     => \$opt_fromPackage,
-
 
1291
        'justpackage:s'     => sub{ opts_add2List( \@opt_justPackage, @_ )},
-
 
1292
        'ignorepackage:s'   => sub{ opts_add2List( \@opt_ignorePackage, @_ )},
-
 
1293
        );
-
 
1294
 
-
 
1295
    #
-
 
1296
    #   Merge in the user options
-
 
1297
    #
-
 
1298
    @commonOptions{keys %args} = values %args;
-
 
1299
 
-
 
1300
    local ( @ARGV );
-
 
1301
    @ARGV = @$pArray;
-
 
1302
    my $rv = GetOptions ( %commonOptions );
-
 
1303
    @$pArray = @ARGV;
-
 
1304
 
-
 
1305
    ErrorConfig('verbose' => $opt_verbose );
-
 
1306
    return $rv;
-
 
1307
}
-
 
1308
 
-
 
1309
#-------------------------------------------------------------------------------
-
 
1310
# Function        : opts_add2List
-
 
1311
#
-
 
1312
# Description     : Option processing helper
-
 
1313
#                   Add comma separated options to an array
-
 
1314
#                   User can then add items one at a time, or several at once
-
 
1315
#
-
 
1316
# Inputs          : aref        - Ref to an array to extent
-
 
1317
#                   arg2        - Option name
-
 
1318
#                   arg3        - Option value
-
 
1319
#
-
 
1320
# Returns         : 
-
 
1321
#
-
 
1322
sub opts_add2List
-
 
1323
{
-
 
1324
    my( $ref, $name, $value) = @_;
-
 
1325
    if ( $value )
-
 
1326
    {
-
 
1327
        foreach ( split(/\s*,\s*/,$value) )
-
 
1328
        {
-
 
1329
            push @{$ref}, $_;
-
 
1330
        }
-
 
1331
    }
-
 
1332
}
-
 
1333
 
-
 
1334
#-------------------------------------------------------------------------------
1138
# Function        : SubCommandHelp
1335
# Function        : SubCommandHelp
1139
#
1336
#
1140
# Description     : Provide help on a subcommand
1337
# Description     : Provide help on a subcommand
1141
#
1338
#
1142
# Inputs          : $help_level             - Help Level 1,2,3
1339
# Inputs          : $help_level             - Help Level 1,2,3
Line 1195... Line 1392...
1195
=head1 SYNOPSIS
1392
=head1 SYNOPSIS
1196
 
1393
 
1197
  jats sandbox [options] command [command options]
1394
  jats sandbox [options] command [command options]
1198
 
1395
 
1199
 Options:
1396
 Options:
1200
    -help[=n]          - Display help with specified detail
1397
    -help[=n]                  - Display help with specified detail
1201
    -help -help        - Detailed help message
1398
    -help -help                - Detailed help message
1202
    -man               - Full documentation
1399
    -man                       - Full documentation
-
 
1400
 
-
 
1401
 Options for recursion control:
-
 
1402
    -toPackage=name            - Stop building after package
-
 
1403
    -fromPackage=name          - Start building from package
-
 
1404
    -justPackage=name[,name]   - Build named packages
-
 
1405
    -ignorePackage=name[,name] - Do not build named packages
1203
 
1406
 
1204
 Commands:
1407
 Commands:
1205
    help                - Same as -help
1408
    help                - Same as -help
1206
    create              - Create a sandbox in the current directory
1409
    create              - Create a sandbox in the current directory
1207
    populate            - Populate the sandbox with packages
1410
    populate            - Populate the sandbox with packages
1208
    delete              - Delete the sandbox
1411
    delete              - Delete the sandbox
1209
    info [[-v]-v]       - Sandbox information. -v: Be more verbose
1412
    info [[-v]-v]       - Sandbox information. -v: Be more verbose
1210
    cmd                 - Do commands in all sandbox components
1413
    cmd                 - Do commands in all sandbox components
1211
    all                 - Do 'build', if required, then a make in all sandbox components
1414
    all                 - Do 'build', if required, then a make in all components
1212
    build               - Force 'build and make' in all sandbox components
1415
    build               - Force 'build and make' in all sandbox components
1213
    make                - Do 'make' in all sandbox components
1416
    make                - Do 'make' in all sandbox components
1214
    clean               - Do 'make clean' in all sandbox components
1417
    clean               - Do 'make clean' in all sandbox components
1215
    clobber             - Do 'build clobber' is all sandbox components
1418
    clobber             - Do 'build clobber' is all sandbox components
1216
    cache               - Cache external dependent packages
1419
    cache               - Cache external dependent packages
Line 1250... Line 1453...
1250
 
1453
 
1251
=item B<-man>
1454
=item B<-man>
1252
 
1455
 
1253
Prints the manual page and exits. This is the same a -help=3
1456
Prints the manual page and exits. This is the same a -help=3
1254
 
1457
 
-
 
1458
=item B<-toPackage=name>
-
 
1459
 
-
 
1460
This option is available in all commands that process multiple packages.
-
 
1461
Package processing will stop at the named package.
-
 
1462
 
-
 
1463
The default operation is to process all packages.
-
 
1464
 
-
 
1465
=item B<-fromPackage=name>
-
 
1466
 
-
 
1467
This option is available in all commands that process multiple packages.
-
 
1468
Package processing will start at the named package.
-
 
1469
 
-
 
1470
The default operation is to process no packages.
-
 
1471
 
-
 
1472
=item B<-justPackage=name[,name]>
-
 
1473
 
-
 
1474
This option is available in all commands that process multiple packages. The
-
 
1475
named packages will be processed in the correct build order. Packages that are
-
 
1476
not named will be skipped, unless the package is being processed due to
-
 
1477
being in the 'fromPackage' to 'toPackage' range.
-
 
1478
 
-
 
1479
Multiple packages can be named either by separating names with a comma, or
-
 
1480
with multiple options.
-
 
1481
 
-
 
1482
=item B<-ignorePackage=name[,name]>
-
 
1483
 
-
 
1484
This option is available in all commands that process multiple packages. The
-
 
1485
named packages will not be processed.
-
 
1486
 
-
 
1487
Multiple packages can be named either by separating names with a comma, or
-
 
1488
with multiple options.
-
 
1489
 
-
 
1490
The exclusion of a package takes precedence over its inclusion.
-
 
1491
 
1255
=back
1492
=back
1256
 
1493
 
1257
=head1 DESCRIPTION
1494
=head1 DESCRIPTION
1258
 
1495
 
1259
This program is the primary tool for the maintenance of Development Sandboxes.
1496
This program is the primary tool for the maintenance of Development Sandboxes.
Line 1291... Line 1528...
1291
 
1528
 
1292
Create Sandbox
1529
Create Sandbox
1293
 
1530
 
1294
=head2 SYNOPSIS
1531
=head2 SYNOPSIS
1295
 
1532
 
1296
jats sandbox [options] create [command options]
1533
jats sandbox create [command options]
1297
 
-
 
1298
 Options:
-
 
1299
    -help[=n]               - Help message, [n=1,2,3]
-
 
1300
    -man                    - Full documentation [-help=3]
-
 
1301
    -verbose[=n]            - Verbose command operation
-
 
1302
 
1534
 
1303
 Command Options
1535
 Command Options
1304
    -help[=n]               - Command specific help, [n=1,2,3]
1536
    -help[=n]               - Command specific help, [n=1,2,3]
1305
    -verbose[=n]            - Verbose operation
1537
    -verbose[=n]            - Verbose operation
1306
    -exact                  - Create sandbox to reproduce exact versions
1538
    -exact                  - Create sandbox to reproduce exact versions
Line 1339... Line 1571...
1339
 
1571
 
1340
Populate a Sandbox
1572
Populate a Sandbox
1341
 
1573
 
1342
=head2 SYNOPSIS
1574
=head2 SYNOPSIS
1343
 
1575
 
1344
jats sandbox [options] populate [command options] [packageName packageVersion]
1576
jats sandbox populate [command options] [packageName packageVersion]
1345
 
-
 
1346
 Options:
-
 
1347
    -help[=n]               - Help message, [n=1,2,3]
-
 
1348
    -man                    - Full documentation [-help=3]
-
 
1349
    -verbose[=n]            - Verbose command operation
-
 
1350
 
1577
 
1351
 Command Options
1578
 Command Options
1352
    -help[=n]               - Command specific help, [n=1,2,3]
1579
    -help[=n]                  - Command specific help, [n=1,2,3]
-
 
1580
    -toPackage=name            - Stop building after package
-
 
1581
    -fromPackage=name          - Start building from package
-
 
1582
    -justPackage=name[,name]   - Build named packages
-
 
1583
    -ignorePackage=name[,name] - Do not build named packages
-
 
1584
    -excludePackage=name[,name]- Do not extract named package
1353
    -recurse[=n]            - Locate dependencies within packages
1585
    -recurse[=n]               - Locate dependencies within packages
-
 
1586
    -all                       - Populate with all dependencies
1354
    -missing                - Locate missing packages
1587
    -missing                   - Locate missing packages
-
 
1588
    -show                      - Show packages that would be extracted
1355
    -test                   - Do not extract packages
1589
    -test                      - Do not extract packages
1356
    -<Other>                - Pass options to jats extract
1590
    -<Other>                   - Pass options to jats extract
1357
 
1591
 
1358
=head2 ARGUMENTS
1592
=head2 ARGUMENTS
1359
 
1593
 
1360
The 'populate' command can take a package name and version as arguments. It will
1594
The 'populate' command can take a package name and version as arguments. It will
1361
then populate the sandbox with this package. See 'DESCRIPTION' for details.
1595
then populate the sandbox with this package. See 'DESCRIPTION' for details.
Line 1364... Line 1598...
1364
 
1598
 
1365
The 'populate' command takes the following options:
1599
The 'populate' command takes the following options:
1366
 
1600
 
1367
=over 4
1601
=over 4
1368
 
1602
 
-
 
1603
=item -excludePackage=name[,name]
-
 
1604
 
-
 
1605
This option prevents one, or more, packages from populating the sandbox.
-
 
1606
Packages specified with this option will not be extracted from version control
-
 
1607
and added to the sandbox.
-
 
1608
 
-
 
1609
Packages can be itentified in three ways:
-
 
1610
 
-
 
1611
=over 4
-
 
1612
 
-
 
1613
=item 1. Package Name
-
 
1614
 
-
 
1615
All package versions matching the named package will be excluded.
-
 
1616
 
-
 
1617
=item 2. Package Name and Version
-
 
1618
 
-
 
1619
Only the specified version of the named package will be excluded. The
-
 
1620
user specifies the package name and version as a single string separated with
-
 
1621
an underscore. ie: core_devl_2.100.5000.cr
-
 
1622
 
-
 
1623
=item 3. Package Name and Suffix
-
 
1624
 
-
 
1625
All packages matching the named package and project will be excluded. The
-
 
1626
user specifies the package name and project as a single string separated with
-
 
1627
a dot. ie: core_devl.cr
-
 
1628
 
-
 
1629
 
-
 
1630
=back
-
 
1631
 
1369
=item -recurse[=N]
1632
=item -recurse[=N]
1370
 
1633
 
1371
This option will modify the operation of the command such that dependencies
1634
This option will modify the operation of the command such that dependencies
1372
of named packages can also be extracted into the sandbox.
1635
of named packages can also be extracted into the sandbox.
1373
 
1636
 
1374
The default operation is to only extract named packages. If the option is
1637
The default operation is to only extract named packages. If the option is
1375
specified then all dependent packages are processed. An optional numeric argument
1638
specified then all dependent packages are processed. An optional numeric argument
1376
can be specified to limit the depth of the recursion.
1639
can be specified to limit the depth of the recursion.
1377
 
1640
 
-
 
1641
=item -all
-
 
1642
 
-
 
1643
This option will populate the sandbox will all dependencies of packages that are
-
 
1644
currently in the sandbox.
-
 
1645
 
-
 
1646
The global options that control recursion will affect the packages that are
-
 
1647
processed.
-
 
1648
 
-
 
1649
This option cannot be used with the '-missing' option.
-
 
1650
 
1378
=item -missing
1651
=item -missing
1379
 
1652
 
1380
This option will modify the operation of the dependency recursion scanning such
1653
This option will modify the operation of the dependency recursion scanning such
1381
that dependent packages that exist in a package archive will not be extracted.
1654
that dependent packages that exist in a package archive will not be extracted.
1382
 
1655
 
1383
Use of this option allows a sandbox to be populated with packages that are
1656
Use of this option allows a sandbox to be populated with packages that are
1384
required by packages in the sandbox, but are not available in a package archive.
1657
required by packages in the sandbox, but are not available in a package archive.
1385
 
1658
 
-
 
1659
The global options that control recursion will affect the packages that are
-
 
1660
processed.
-
 
1661
 
-
 
1662
This option cannot be used with the '-all' option.
-
 
1663
 
-
 
1664
=item -show
-
 
1665
 
-
 
1666
This option will prevent the command from performing the extraction. It will
-
 
1667
simply display the names of the packages that would be extracted.
-
 
1668
 
1386
=item -test
1669
=item -test
1387
 
1670
 
1388
This option will prevent the command from performing the extraction. It will
1671
This option will prevent the command from performing the extraction. It will
1389
simply display the JATS commands that can be used to perform the extraction.
1672
simply display the JATS commands that can be used to perform the extraction.
1390
 
1673
 
Line 1499... Line 1782...
1499
 
1782
 
1500
Display Sandbox Information
1783
Display Sandbox Information
1501
 
1784
 
1502
=head2 SYNOPSIS
1785
=head2 SYNOPSIS
1503
 
1786
 
1504
jats sandbox [options] info [command options]
1787
jats sandbox info [command options]
1505
 
-
 
1506
 Options:
-
 
1507
    -help[=n]               - Help message, [n=1,2,3]
-
 
1508
    -man                    - Full documentation [-help=3]
-
 
1509
    -verbose[=n]            - Verbose command operation
-
 
1510
 
1788
 
1511
 Command Options
1789
 Command Options
1512
    -help[=n]               - Command specific help, [n=1,2,3]
1790
    -help[=n]                  - Command specific help, [n=1,2,3]
1513
    -verbose[=n]            - Display more information
1791
    -verbose[=n]               - Display more information
-
 
1792
    -toPackage=name            - Stop building after package
-
 
1793
    -fromPackage=name          - Start building from package
-
 
1794
    -justPackage=name[,name]   - Build named packages
-
 
1795
    -ignorePackage=name[,name] - Do not build named packages
1514
 
1796
 
1515
=head2 OPTIONS
1797
=head2 OPTIONS
1516
 
1798
 
1517
=over
1799
=over
1518
 
1800
 
Line 1589... Line 1871...
1589
 
1871
 
1590
Build packages in the sandbox
1872
Build packages in the sandbox
1591
 
1873
 
1592
=head2 SYNOPSIS
1874
=head2 SYNOPSIS
1593
 
1875
 
1594
jats sandbox [options] all [command options] [arguments]
1876
jats sandbox all [command options] [arguments]
1595
 
-
 
1596
 Options:
-
 
1597
    -help[=n]               - Help message, [n=1,2,3]
-
 
1598
    -man                    - Full documentation [-help=3]
-
 
1599
    -verbose[=n]            - Verbose command operation
-
 
1600
 
1877
 
1601
 Command Options
1878
 Command Options
1602
    -help[=n]               - Command specific help, [n=1,2,3]
1879
    -help[=n]                  - Command specific help, [n=1,2,3]
-
 
1880
    -toPackage=name            - Stop building after package
-
 
1881
    -fromPackage=name          - Start building from package
-
 
1882
    -justPackage=name[,name]   - Build named packages
-
 
1883
    -ignorePackage=name[,name] - Do not build named packages
1603
 
1884
 
1604
=head2 ARGUMENTS
1885
=head2 ARGUMENTS
1605
 
1886
 
1606
Arguments are passed to the 'make' phase of the process.
1887
Arguments are passed to the 'make' phase of the process.
1607
 
1888
 
Line 1637... Line 1918...
1637
 
1918
 
1638
Build packages in the sandbox
1919
Build packages in the sandbox
1639
 
1920
 
1640
=head2 SYNOPSIS
1921
=head2 SYNOPSIS
1641
 
1922
 
1642
jats sandbox [options] build [command options] [arguments]
1923
jats sandbox build [command options] [arguments]
1643
 
-
 
1644
 Options:
-
 
1645
    -help[=n]               - Help message, [n=1,2,3]
-
 
1646
    -man                    - Full documentation [-help=3]
-
 
1647
    -verbose[=n]            - Verbose command operation
-
 
1648
 
1924
 
1649
 Command Options
1925
 Command Options
1650
    -help[=n]               - Command specific help, [n=1,2,3]
1926
    -help[=n]                  - Command specific help, [n=1,2,3]
-
 
1927
    -toPackage=name            - Stop building after package
-
 
1928
    -fromPackage=name          - Start building from package
-
 
1929
    -justPackage=name[,name]   - Build named packages
-
 
1930
    -ignorePackage=name[,name] - Do not build named packages
1651
 
1931
 
1652
=head2 ARGUMENTS
1932
=head2 ARGUMENTS
1653
 
1933
 
1654
Arguments are passed to the 'make' phase of the process.
1934
Arguments are passed to the 'make' phase of the process.
1655
 
1935
 
Line 1672... Line 1952...
1672
 
1952
 
1673
Clean all sandbox components
1953
Clean all sandbox components
1674
 
1954
 
1675
=head2 SYNOPSIS
1955
=head2 SYNOPSIS
1676
 
1956
 
1677
jats sandbox [options] clean|clobber [command options]
1957
jats sandbox clean|clobber [command options]
1678
 
-
 
1679
 Options:
-
 
1680
    -help[=n]               - Help message, [n=1,2,3]
-
 
1681
    -man                    - Full documentation [-help=3]
-
 
1682
    -verbose[=n]            - Verbose command operation
-
 
1683
 
1958
 
1684
 Command Options
1959
 Command Options
1685
    -help[=n]               - Command specific help, [n=1,2,3]
1960
    -help[=n]                  - Command specific help, [n=1,2,3]
-
 
1961
    -toPackage=name            - Stop building after package
-
 
1962
    -fromPackage=name          - Start building from package
-
 
1963
    -justPackage=name[,name]   - Build named packages
-
 
1964
    -ignorePackage=name[,name] - Do not build named packages
1686
 
1965
 
1687
=head2 ARGUMENTS
1966
=head2 ARGUMENTS
1688
 
1967
 
1689
None
1968
None
1690
 
1969
 
Line 1706... Line 1985...
1706
 
1985
 
1707
Make packages in the sandbox
1986
Make packages in the sandbox
1708
 
1987
 
1709
=head2 SYNOPSIS
1988
=head2 SYNOPSIS
1710
 
1989
 
1711
jats sandbox [options] make [command options] [arguments]
1990
jats sandbox make [command options] [arguments]
1712
 
-
 
1713
 Options:
-
 
1714
    -help[=n]               - Help message, [n=1,2,3]
-
 
1715
    -man                    - Full documentation [-help=3]
-
 
1716
    -verbose[=n]            - Verbose command operation
-
 
1717
 
1991
 
1718
 Command Options
1992
 Command Options
1719
    -help[=n]               - Command specific help, [n=1,2,3]
1993
    -help[=n]                  - Command specific help, [n=1,2,3]
-
 
1994
    -toPackage=name            - Stop building after package
-
 
1995
    -fromPackage=name          - Start building from package
-
 
1996
    -justPackage=name[,name]   - Build named packages
-
 
1997
    -ignorePackage=name[,name] - Do not build named packages
1720
 
1998
 
1721
=head2 ARGUMENTS
1999
=head2 ARGUMENTS
1722
 
2000
 
1723
Arguments are passed to the 'make' phase of the process.
2001
Arguments are passed to the 'make' phase of the process.
1724
 
2002
 
Line 1739... Line 2017...
1739
 
2017
 
1740
Process each package with a specified command.
2018
Process each package with a specified command.
1741
 
2019
 
1742
=head2 SYNOPSIS
2020
=head2 SYNOPSIS
1743
 
2021
 
1744
jats sandbox [options] cmd [command options] [arguments]
2022
jats sandbox cmd [command options] [arguments]
1745
 
-
 
1746
 Options:
-
 
1747
    -help[=n]               - Help message, [n=1,2,3]
-
 
1748
    -man                    - Full documentation [-help=3]
-
 
1749
    -verbose[=n]            - Verbose command operation
-
 
1750
 
2023
 
1751
 Command Options
2024
 Command Options
1752
    -help[=n]               - Command specific help, [n=1,2,3]
2025
    -help[=n]                  - Command specific help, [n=1,2,3]
-
 
2026
    -toPackage=name            - Stop building after package
-
 
2027
    -fromPackage=name          - Start building from package
-
 
2028
    -justPackage=name[,name]   - Build named packages
-
 
2029
    -ignorePackage=name[,name] - Do not build named packages
1753
 
2030
 
1754
=head2 ARGUMENTS
2031
=head2 ARGUMENTS
1755
 
2032
 
1756
Arguments are passed to a JATS command.
2033
Arguments are passed to a JATS command.
1757
 
2034