Subversion Repositories DevTools

Rev

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

Rev 7301 Rev 7304
Line 138... Line 138...
138
populate(@ARGV)                         if ( $cmd =~ m/^populate$/  );
138
populate(@ARGV)                         if ( $cmd =~ m/^populate$/  );
139
buildfilter(@ARGV)                      if ( $cmd =~ m/^buildfilter$/  );
139
buildfilter(@ARGV)                      if ( $cmd =~ m/^buildfilter$/  );
140
skipBuild(0, @ARGV)                     if ( $cmd =~ m/^skip$/  );
140
skipBuild(0, @ARGV)                     if ( $cmd =~ m/^skip$/  );
141
skipBuild(1, @ARGV)                     if ( $cmd =~ m/^unskip$/  );
141
skipBuild(1, @ARGV)                     if ( $cmd =~ m/^unskip$/  );
142
fingerPrintPkg(@ARGV)                   if ( $cmd =~ m/^finger/i );
142
fingerPrintPkg(@ARGV)                   if ( $cmd =~ m/^finger/i );
-
 
143
testLinks(@ARGV)                        if ( $cmd =~ m/^testlinks/i );
143
 
144
 
144
Error ("Unknown sandbox command: $cmd");
145
Error ("Unknown sandbox command: $cmd");
145
exit 1;
146
exit 1;
146
 
147
 
147
 
148
 
Line 550... Line 551...
550
    }
551
    }
551
 
552
 
552
    exit (0);
553
    exit (0);
553
}
554
}
554
 
555
 
-
 
556
#-------------------------------------------------------------------------------
-
 
557
# Function        : testLinks 
-
 
558
#
-
 
559
# Description     : Test the lnk files in the sandbox directory
-
 
560
#                   These may be stake after packages are deleted
-
 
561
#
-
 
562
# Inputs          : 
-
 
563
#
-
 
564
# Returns         : 
-
 
565
#
-
 
566
sub testLinks
-
 
567
{
-
 
568
    my ( @cmd_opts ) = @_;
-
 
569
    my $opt_delete;
-
 
570
 
-
 
571
    GetOptions (
-
 
572
                "help:+"        => \$opt_help,
-
 
573
                "manual:3"      => \$opt_help,
-
 
574
                'delete!'       => \$opt_delete,
-
 
575
                ) || Error ("Invalid command line" );
-
 
576
 
-
 
577
    SubCommandHelp( $opt_help, "Sandbox Test Links") if ($opt_help || $#ARGV >= 0 );
-
 
578
    Error ("Command must be executed from within a Sandbox") unless ( $GBE_SANDBOX );
-
 
579
 
-
 
580
    #
-
 
581
    #   Process all packages in the sandbox
-
 
582
    #
-
 
583
    foreach my $linkFile ( glob "$GBE_DPKG_SBOX/*/*.lnk")
-
 
584
    {
-
 
585
        my $pkg = TagFileRead($linkFile);
-
 
586
 
-
 
587
        $pkg =~ s~\\~/~g;
-
 
588
        if ($pkg =~ s~^GBE_SANDBOX/~$GBE_SANDBOX/~)
-
 
589
        {
-
 
590
                # If the target sandbox is in the 'deploymode' then the package
-
 
591
                # will not be in the expected location. It will be in a 'build/deploy'
-
 
592
                # subdir. Remove the pkg/name dir to get to the root of the package
-
 
593
                my @dirs = File::Spec->splitdir( $pkg );
-
 
594
                splice(@dirs, -2);
-
 
595
                my $deployBox = catdir(@dirs, 'build', 'deploy');
-
 
596
                $pkg = $deployBox if ( -d $deployBox);
-
 
597
        }
-
 
598
 
-
 
599
        unless ( -d $pkg )
-
 
600
        {
-
 
601
            if ($opt_delete)
-
 
602
            {
-
 
603
                Message ("Delete: $linkFile");
-
 
604
                unlink $linkFile;
-
 
605
            } 
-
 
606
            else
-
 
607
            {
-
 
608
                Message ("Broken link: $pkg", "Source link: $linkFile" );
-
 
609
            }
-
 
610
        }
-
 
611
 
-
 
612
    }
-
 
613
    
-
 
614
    exit (0);
-
 
615
}
-
 
616
 
555
 
617
 
556
#-------------------------------------------------------------------------------
618
#-------------------------------------------------------------------------------
557
# Function        : check_package_existance
619
# Function        : check_package_existance
558
#
620
#
559
# Description     : Determine if a given package-version exists
621
# Description     : Determine if a given package-version exists
Line 2394... Line 2456...
2394
    delete              - Delete the sandbox
2456
    delete              - Delete the sandbox
2395
    info [[-v]-v]       - Sandbox information. -v: Be more verbose
2457
    info [[-v]-v]       - Sandbox information. -v: Be more verbose
2396
    buildfilter         - Modify and display sandbox buildfilter
2458
    buildfilter         - Modify and display sandbox buildfilter
2397
    [un]skip            - Mark a package to be skipped during the build
2459
    [un]skip            - Mark a package to be skipped during the build
2398
    fingerprint         - Various fingerprint operations
2460
    fingerprint         - Various fingerprint operations
-
 
2461
    testlinks           - Test / Delete broken package symlinks
2399
    cmd                 - Do commands in all sandbox components
2462
    cmd                 - Do commands in all sandbox components
2400
    all                 - Do 'build', if required, then a make in all components
2463
    all                 - Do 'build', if required, then a make in all components
2401
    build               - Force 'build and make' in all sandbox components
2464
    build               - Force 'build and make' in all sandbox components
2402
    make                - Do 'make' in all sandbox components
2465
    make                - Do 'make' in all sandbox components
2403
    clean               - Do 'make clean' in all sandbox components
2466
    clean               - Do 'make clean' in all sandbox components
Line 3404... Line 3467...
3404
 
3467
 
3405
This command allows the simple creation of a small development environment that
3468
This command allows the simple creation of a small development environment that
3406
is not tied to the larger Development Environment. It may then be used in a
3469
is not tied to the larger Development Environment. It may then be used in a
3407
disconnected mode to perform development.
3470
disconnected mode to perform development.
3408
 
3471
 
-
 
3472
=head1 Sandbox Test Links
-
 
3473
 
-
 
3474
=head2 NAME
-
 
3475
 
-
 
3476
Test and delete sandbox link files
-
 
3477
 
-
 
3478
=head2 SYNOPSIS
-
 
3479
 
-
 
3480
jats sandbox testlinks [options]
-
 
3481
 
-
 
3482
 Command Options
-
 
3483
    -help[=n]               - Command specific help, [n=1,2,3]
-
 
3484
    -man                    - Same as -help=3
-
 
3485
    -[no]delete             - Delete bad links
-
 
3486
 
-
 
3487
=head2 ARGUMENTS
-
 
3488
 
-
 
3489
This command does not take any arguments
-
 
3490
 
-
 
3491
=head2 OPTIONS
-
 
3492
 
-
 
3493
The 'fingerprint' command takes the following options:
-
 
3494
 
-
 
3495
=over 8
-
 
3496
 
-
 
3497
=item -[no]delete
-
 
3498
 
-
 
3499
This option will delete the link files if they are bad.
-
 
3500
 
-
 
3501
=back
-
 
3502
 
-
 
3503
=head2 DESCRIPTION
-
 
3504
 
-
 
3505
The 'testlinks' command, will by default, examine symbolic links within the sandbox and report on
-
 
3506
broken links.
-
 
3507
 
-
 
3508
An option allwos the broken links to be deleted.
-
 
3509
 
-
 
3510
Each package in the sandbox will have a symbolic link to the packages 'package' area. If a package is removed
-
 
3511
from the sandbox the link file may be left in the sandbox and cause a 'build' to fail.
-
 
3512
 
-
 
3513
=head2 EXAMPLES
-
 
3514
 
-
 
3515
The command
-
 
3516
 
-
 
3517
    jats sandbox testlinks
-
 
3518
 
-
 
3519
will test the symbolic links in the sandbox metadata.
-
 
3520
 
3409
=cut
3521
=cut
3410
 
3522