Subversion Repositories DevTools

Rev

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

Rev 7301 Rev 7319
Line 112... Line 112...
112
                   'cache'     => 'GBE_DPKG_CACHE',
112
                   'cache'     => 'GBE_DPKG_CACHE',
113
                   'local'     => 'GBE_DPKG_LOCAL',
113
                   'local'     => 'GBE_DPKG_LOCAL',
114
                   'sandbox'   => 'GBE_DPKG_SBOX',
114
                   'sandbox'   => 'GBE_DPKG_SBOX',
115
                   'deploy'    => 'GBE_DPLY',
115
                   'deploy'    => 'GBE_DPLY',
116
                   'replica'   => 'GBE_DPKG_REPLICA',
116
                   'replica'   => 'GBE_DPKG_REPLICA',
-
 
117
                   'escrow'    => 'GBE_DPKG_ESCROW',
117
                   );
118
                   );
118
 
119
 
119
#------------------------------------------------------------------------------
120
#------------------------------------------------------------------------------
120
#------------------------------------------------------------------------------
121
#------------------------------------------------------------------------------
121
# Subroutines
122
# Subroutines
Line 297... Line 298...
297
    #
298
    #
298
    EnvImport ('GBE_MACHTYPE');
299
    EnvImport ('GBE_MACHTYPE');
299
    EnvImport ('GBE_HOSTNAME');
300
    EnvImport ('GBE_HOSTNAME');
300
    EnvImport ('USER' );
301
    EnvImport ('USER' );
301
    EnvImportOptional ('GBE_ABT', "");
302
    EnvImportOptional ('GBE_ABT', "");
-
 
303
    EnvImportOptional ('GBE_DPKG_ESCROW', "");
302
    $CWD_DIR = catdir($CWD_DIR);
304
    $CWD_DIR = catdir($CWD_DIR);
303
 
305
 
304
    #
306
    #
305
    #   Determine the target archive
307
    #   Determine the target archive
306
    #   The default archive is GBE_DPKG, but this may be changed
308
    #   The default archive is GBE_DPKG, but this may be changed
307
    #
309
    #
308
    $opt_archive = 'main' unless ( $opt_archive );
310
    unless ( $opt_archive )
-
 
311
    {
-
 
312
        $opt_archive = 'main';
-
 
313
        $opt_archive = 'escrow' if ($::GBE_DPKG_ESCROW);
-
 
314
    }
309
    my $archive_tag = $Archive2Var{$opt_archive};
315
    my $archive_tag = $Archive2Var{$opt_archive};
310
    Error("Unknown archive specified: $opt_archive")
316
    Error("Unknown archive specified: $opt_archive")
311
        unless ( $archive_tag );
317
        unless ( $archive_tag );
312
    $DPKG_ROOT = $ENV{$archive_tag} || '';
318
    $DPKG_ROOT = $ENV{$archive_tag} || '';
313
    Verbose ("Archive Variable: $archive_tag" );
319
    Verbose ("Archive Variable: $archive_tag" );
Line 323... Line 329...
323
    #   This will bypass most of the operation of this package
329
    #   This will bypass most of the operation of this package
324
    #
330
    #
325
    $opt_noBuild = 2 if -f 'noBuild.gbe';
331
    $opt_noBuild = 2 if -f 'noBuild.gbe';
326
    if ( $opt_noBuild)
332
    if ( $opt_noBuild)
327
    {
333
    {
328
        Verbose ("No Build Marker file found");
334
        Verbose ("NoBuild Marker file found");
329
        Error("Use of noBuild marker should only be done by a build daemon")
-
 
330
            unless ( $GBE_ABT );
-
 
331
 
335
 
332
        $SRC_ROOT = '';
336
        $SRC_ROOT = '';
333
        $DPKG_NAME = 'pkg';
337
        $DPKG_NAME = 'pkg';
334
        $DESCPKG_FILE = 'descpkg';
338
        $DESCPKG_FILE = 'descpkg';
335
        $PKG_BASE =$CWD_DIR;
339
        $PKG_BASE =$CWD_DIR;
336
 
340
 
337
        Error("NoBuild operation requires package name and version") unless ($opt_pname && $opt_pversion);
-
 
338
        $DPKG_NAME = $opt_pname;
-
 
339
        $DPKG_VERSION = $opt_pversion;
-
 
340
 
-
 
341
        return;
341
        return;
342
    }
342
    }
343
 
343
 
344
    #
344
    #
345
    #   Check for a "pkg" directory
345
    #   Check for a "pkg" directory
Line 406... Line 406...
406
#
406
#
407
# Returns         : Will not return on error
407
# Returns         : Will not return on error
408
#
408
#
409
sub CheckDescPkg
409
sub CheckDescPkg
410
{
410
{
411
    #
-
 
412
    #   Don't need a package description if performing a no-build
-
 
413
    #   The package name and version will be provided on the command line
-
 
414
    #   NoBuilds MUST NOT package up a descpkg file
-
 
415
    #
-
 
416
    return if ($opt_noBuild);
-
 
417
 
411
 
418
    # Get the dpkg_archive version number we are  going to create.
412
    # Get the dpkg_archive version number we are  going to create.
419
    #
413
    #
420
    Error("Descpkg file not found in package directory: $PKG_BASE")
414
    Error("Descpkg file not found in package directory: $PKG_BASE")
421
        unless ( -f "$DESCPKG_FILE" );
415
        unless ( -f "$DESCPKG_FILE" );
Line 517... Line 511...
517
    Information ("---------------------------------------------------------------");
511
    Information ("---------------------------------------------------------------");
518
    Information ("Dpkg archive creation tool...");
512
    Information ("Dpkg archive creation tool...");
519
    Information ("Version: $VERSION");
513
    Information ("Version: $VERSION");
520
    Information ("");
514
    Information ("");
521
    Information ("Information:");
515
    Information ("Information:");
-
 
516
    Information ("Escrow Build") if ($opt_archive eq 'escrow');
522
    Information ("Working dir   = [$CWD_DIR]");
517
    Information ("Working dir   = [$CWD_DIR]");
523
    Information ("Package Root  = [$SRC_ROOT]");
518
    Information ("Package Root  = [$SRC_ROOT]");
524
    Information ("Repository    = [$DPKG_ROOT]");
519
    Information ("Repository    = [$DPKG_ROOT]");
525
    Information ("                *Non Standard archive") unless $opt_archive eq 'main';
520
    Information ("                *Non Standard archive") unless ($opt_archive eq 'main' || $opt_archive eq 'escrow');
526
    Information ("Target dir    = [$DPKG_DIR]");
521
    Information ("Target dir    = [$DPKG_DIR]");
527
    Information1("DPKG_NAME     = [$DPKG_NAME]");
522
    Information1("DPKG_NAME     = [$DPKG_NAME]");
528
    Information1("DPKG_VERSION  = [$DPKG_VERSION]");
523
    Information1("DPKG_VERSION  = [$DPKG_VERSION]");
529
    Information1("DPKG_PRJ      = [$DPKG_PRJ]");
524
    Information1("DPKG_PRJ      = [$DPKG_PRJ]");
530
    Information1("DPKG_SIGNATURE= [$DPKG_SIGNATURE]") if $DPKG_SIGNATURE;
525
    Information1("DPKG_SIGNATURE= [$DPKG_SIGNATURE]") if $DPKG_SIGNATURE;
Line 550... Line 545...
550
    #   from such an environment is certainly not reproducible - so don't allow
545
    #   from such an environment is certainly not reproducible - so don't allow
551
    #   it to happen
546
    #   it to happen
552
    #
547
    #
553
    #   Allow versions of 99.99.99 as these are known to be test versions
548
    #   Allow versions of 99.99.99 as these are known to be test versions
554
    #
549
    #
555
    unless ( $opt_archive eq 'local' || $opt_archive eq 'sandbox' || $opt_testArchive)
550
    unless ( $opt_archive eq 'local' || $opt_archive eq 'sandbox' || $opt_testArchive || $::GBE_DPKG_ESCROW)
556
    {
551
    {
557
        if ( $ENV{GBE_DPKG_SBOX} )
552
        if ( $ENV{GBE_DPKG_SBOX} )
558
        {
553
        {
559
            unless ( $DPKG_VERSION =~ /^99.99.99/ )
554
            unless ( $DPKG_VERSION =~ /^99.99.99/ )
560
            {
555
            {
Line 1425... Line 1420...
1425
    -quiet             - Suppress progress messages, then warning messages
1420
    -quiet             - Suppress progress messages, then warning messages
1426
    -verbose           - Display additional progress messages
1421
    -verbose           - Display additional progress messages
1427
    -override          - Deprecated option
1422
    -override          - Deprecated option
1428
    -delete            - Delete any previous version of the package
1423
    -delete            - Delete any previous version of the package
1429
    -[no]merge         - merge with existing version of the package
1424
    -[no]merge         - merge with existing version of the package
1430
    -archive=name      - Specify archive (cache, local, main, store, sandbox, deploy)
1425
    -archive=name      - Specify archive (cache, local, main, store, sandbox, deploy, escrow)
1431
    -pname=name        - Ensure package is named correctly
1426
    -pname=name        - Ensure package is named correctly
1432
    -pversion=version  - Ensure package version is correct
1427
    -pversion=version  - Ensure package version is correct
1433
    -generic           - Create a built.generic file
1428
    -generic           - Create a built.generic file
1434
    -noBuild           - Create dummy build files
1429
    -noBuild           - Create dummy build files
1435
    -[no]tarmode       - Transfer package as tarball
1430
    -[no]tarmode       - Transfer package as tarball
Line 1513... Line 1508...
1513
 
1508
 
1514
The location of the target archive will be taken from C<GBE_DPKG_SBOX>.
1509
The location of the target archive will be taken from C<GBE_DPKG_SBOX>.
1515
 
1510
 
1516
=item deploy
1511
=item deploy
1517
 
1512
 
1518
The location of the target archive will be taken from C<GBE_DPLY>. This is the
1513
The location of the target archive will be taken from C<GBE_DPLY>.
-
 
1514
 
-
 
1515
Note: This archive is no longer fully supported.
-
 
1516
 
-
 
1517
=item escrow
-
 
1518
 
-
 
1519
The location of the target archive will be taken from C<GBE_DPKG_ESCROW>.
-
 
1520
 
1519
default target archive is a deployment package is detected.
1521
This is the default target archive if an escrow build is detected.
1520
 
1522
 
1521
=back
1523
=back
1522
 
1524
 
1523
=item B<-pname=name>
1525
=item B<-pname=name>
1524
 
1526