Subversion Repositories DevTools

Rev

Rev 4455 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4455 Rev 4548
Line 68... Line 68...
68
my $DPKG_ROOT;
68
my $DPKG_ROOT;
69
my $PKG_BASE;
69
my $PKG_BASE;
70
my $bad_merge_count = 0;
70
my $bad_merge_count = 0;
71
my @bad_symlinks;
71
my @bad_symlinks;
72
my @fileList;
72
my @fileList;
-
 
73
my $descPkgCount = 0;
73
 
74
 
74
#
75
#
75
#   Option variables
76
#   Option variables
76
#
77
#
77
my $opt_help = 0;
78
my $opt_help = 0;
78
my $opt_manual = 0;
79
my $opt_manual = 0;
79
my $opt_verbose = 0;
80
my $opt_verbose = 0;
80
my $opt_quiet = 0;
81
my $opt_quiet = 0;
81
my $opt_delete = 0;
82
my $opt_delete = 0;
-
 
83
my $opt_override = 0;
82
my $opt_merge = 0;
84
my $opt_merge = 0;
83
my $opt_archive;
85
my $opt_archive;
84
my $opt_generic;
86
my $opt_generic;
85
my $opt_pname;
87
my $opt_pname;
86
my $opt_pversion;
88
my $opt_pversion;
Line 226... Line 228...
226
    # Process any command line arguements...
228
    # Process any command line arguements...
227
    my $result = GetOptions (
229
    my $result = GetOptions (
228
                "help:+"        => \$opt_help,              # flag, multiple use allowed
230
                "help:+"        => \$opt_help,              # flag, multiple use allowed
229
                "manual:3"      => \$opt_help,              # flag
231
                "manual:3"      => \$opt_help,              # flag
230
                "verbose:+"     => \$opt_verbose,           # flag, multiple use allowed
232
                "verbose:+"     => \$opt_verbose,           # flag, multiple use allowed
-
 
233
                "override!"     => \$opt_override,          # [no]flag (No longer used. Backward compat with build tool)
231
                "delete!"       => \$opt_delete,            # [no]flag
234
                "delete!"       => \$opt_delete,            # [no]flag
232
                "merge|m!"      => \$opt_merge,             # [no]flag.
235
                "merge|m!"      => \$opt_merge,             # [no]flag.
233
                "archive=s"     => \$opt_archive,           # string
236
                "archive=s"     => \$opt_archive,           # string
234
                "quiet+"        => \$opt_quiet,             # Flag
237
                "quiet+"        => \$opt_quiet,             # Flag
235
                "generic!"      => \$opt_generic,           # [no]Flag
238
                "generic!"      => \$opt_generic,           # [no]Flag
236
                "pname=s"       => \$opt_pname,             # string
239
                "pname=s"       => \$opt_pname,             # string
237
                "pversion=s"    => \$opt_pversion,          # string
240
                "pversion=s"    => \$opt_pversion,          # string
238
                "test!"         => \$opt_test,              # [no]flag
241
                "test!"         => \$opt_test,              # [no]flag
239
                "md5!"          => \$opt_md5,               # [no]flag
242
                "md5!"          => \$opt_md5,               # [no]flag
240
                "info"          => \$opt_info,              # [no]flag
243
                "info!"         => \$opt_info,              # [no]flag
241
                );
244
                );
242
 
245
 
243
 
246
 
244
    #
247
    #
245
    #   Process help and manual options
248
    #   Process help and manual options
Line 343... Line 346...
343
    #   Packages are located by looking for a file called descpkg within the
346
    #   Packages are located by looking for a file called descpkg within the
344
    #   main package directory.
347
    #   main package directory.
345
    #
348
    #
346
    #   This installation process only handles one such file
349
    #   This installation process only handles one such file
347
    #
350
    #
-
 
351
    $descPkgCount = 0;
348
    File::Find::find( \&pkgFind, $PKG_BASE);
352
    File::Find::find( \&pkgFind, $PKG_BASE);
-
 
353
 
-
 
354
    if ($descPkgCount > 1 )
-
 
355
    {
-
 
356
        Warning ("Package contains multiple ($descPkgCount) descpkg files");
-
 
357
    }
349
}
358
}
350
 
359
 
351
#-------------------------------------------------------------------------------
360
#-------------------------------------------------------------------------------
352
# Function        : CheckDescPkg
361
# Function        : CheckDescPkg
353
#
362
#
Line 462... Line 471...
462
    Information1("USER          = [$USER]");
471
    Information1("USER          = [$USER]");
463
    Information ("")                                if ( $opt_merge || $opt_delete || $opt_info);
472
    Information ("")                                if ( $opt_merge || $opt_delete || $opt_info);
464
    Information ("Opt:Delete    = Enabled")         if ( $opt_delete );
473
    Information ("Opt:Delete    = Enabled")         if ( $opt_delete );
465
    Information ("Opt:Merge     = Enabled")         if ( $opt_merge );
474
    Information ("Opt:Merge     = Enabled")         if ( $opt_merge );
466
    Information ("Opt:TestMode  = Enabled. No Package Transferred") if ( $opt_test );
475
    Information ("Opt:TestMode  = Enabled. No Package Transferred") if ( $opt_test );
467
    Information ("Opt:Info      = Enabled")        if ( $opt_info );
476
    Information ("Opt:Info      = Enabled. No Package Transferred") if ( $opt_info );
468
    Warning     ("Sandbox Build = Yes") if ($ENV{GBE_DPKG_SBOX}) ;
477
    Warning     ("Sandbox Build = Yes") if ($ENV{GBE_DPKG_SBOX}) ;
469
    Information ("---------------------------------------------------------------");
478
    Information ("---------------------------------------------------------------");
470
 
479
 
471
    #
480
    #
472
    #   If the environment variable GBE_DPKG_SBOX is defined then the package
481
    #   If the environment variable GBE_DPKG_SBOX is defined then the package
Line 510... Line 519...
510
    # so our start dir.
519
    # so our start dir.
511
 
520
 
512
    # we need to determine which file we are dealing with
521
    # we need to determine which file we are dealing with
513
    if ( ! -d $item && $file =~ /^descpkg$/ )
522
    if ( ! -d $item && $file =~ /^descpkg$/ )
514
    {
523
    {
-
 
524
        $descPkgCount++;
-
 
525
 
515
        #
526
        #
516
        #   Only grab the first one
527
        #   Only grab the first one
517
        #
528
        #
518
        if ( $DESCPKG_FILE )
529
        if ( $DESCPKG_FILE )
519
        {
530
        {
-
 
531
            $item =~ s~$PKG_BASE/~~;
520
            Warning ("Package contains multiple descpkg files");
532
            Verbose ("Multiple descpkg files:", $item );
521
            return;
533
            return;
522
        }
534
        }
523
 
535
 
524
        $DESCPKG_FILE = $item;
536
        $DESCPKG_FILE = $item;
525
        my($dir)= File::Basename::dirname($item);
537
        my($dir)= File::Basename::dirname($item);
Line 1003... Line 1015...
1003
    -help              - Brief help message
1015
    -help              - Brief help message
1004
    -help -help        - Detailed help message
1016
    -help -help        - Detailed help message
1005
    -man               - Full documentation
1017
    -man               - Full documentation
1006
    -quiet             - Suppress progress messages, then warning messages
1018
    -quiet             - Suppress progress messages, then warning messages
1007
    -verbose           - Display additional progress messages
1019
    -verbose           - Display additional progress messages
-
 
1020
    -override          - Deprecated option
1008
    -delete            - Delete any previous version of the package
1021
    -delete            - Delete any previous version of the package
1009
    -[no]merge         - merge with existing version of the package
1022
    -[no]merge         - merge with existing version of the package
1010
    -archive=name      - Specify archive (cache, local, main, store, sandbox, deploy)
1023
    -archive=name      - Specify archive (cache, local, main, store, sandbox, deploy)
1011
    -pname=name        - Ensure package is named correctly
1024
    -pname=name        - Ensure package is named correctly
1012
    -pversion=version  - Ensure package version is correct
1025
    -pversion=version  - Ensure package version is correct
1013
    -generic           - Create a built.generic file
1026
    -generic           - Create a built.generic file
1014
    -[no]test          - Test package. Do not transfer.
-
 
1015
    -[no]md5           - Use MD5 comparison of merged files(enabled)
1027
    -[no]md5           - Use MD5 comparison of merged files(enabled)
1016
    
-
 
-
 
1028
    -[no]test          - Test package. Do not transfer.
-
 
1029
    -[no]info          - Display packaging info. Do not transfer.
1017
 
1030
 
1018
=head1 OPTIONS
1031
=head1 OPTIONS
1019
 
1032
 
1020
=over 8
1033
=over 8
1021
 
1034
 
Line 1035... Line 1048...
1035
 
1048
 
1036
This option will suppress almost all of the progress messages, except for a single
1049
This option will suppress almost all of the progress messages, except for a single
1037
copy message. It is intended to be used when the program is called from another
1050
copy message. It is intended to be used when the program is called from another
1038
script.
1051
script.
1039
 
1052
 
-
 
1053
=item B<-override>
-
 
1054
 
-
 
1055
If this option has been deprecated. It has no effect.
-
 
1056
 
-
 
1057
It is still present to preserve backward compatability with the automated 
-
 
1058
build system.
-
 
1059
 
1040
=item B<-delete>
1060
=item B<-delete>
1041
 
1061
 
1042
If this option is enabled then any previous version of the target package will
1062
If this option is enabled then any previous version of the target package will
1043
be deleted.
1063
be deleted.
1044
 
1064
 
Line 1091... Line 1111...
1091
=item B<-pversion=version>
1111
=item B<-pversion=version>
1092
 
1112
 
1093
If this option is provided, the utility will ensure that the package version is
1113
If this option is provided, the utility will ensure that the package version is
1094
that expected.
1114
that expected.
1095
 
1115
 
1096
=item B<-test>
1116
=item B<-generic>
1097
 
1117
 
1098
If this option is enabled the utility will perform initial sanity testing, but
1118
This option will create a built.generic file, instead of one based on the machine
1099
it will not perform the copy.
1119
that actually built the package. This is used by the AutoBuilder toolchain.
1100
 
1120
 
1101
=item B<-[no]md5>
1121
=item B<-[no]md5>
1102
 
1122
 
1103
If package builds are being merged then a validity check is performed using
1123
If package builds are being merged then a validity check is performed using
1104
an MD5 digest over the current and the existing file.
1124
an MD5 digest over the current and the existing file.
Line 1106... Line 1126...
1106
By default, it is an error for the user file to differ from the merged file.
1126
By default, it is an error for the user file to differ from the merged file.
1107
 
1127
 
1108
This option disabled the error. The test is still done and the results are
1128
This option disabled the error. The test is still done and the results are
1109
reported.
1129
reported.
1110
 
1130
 
1111
=item B<-generic>
1131
=item B<-test>
1112
 
1132
 
-
 
1133
If this option is enabled the utility will perform initial sanity testing, but
-
 
1134
it will not perform the copy.
-
 
1135
 
-
 
1136
=item B<-[no]info>
-
 
1137
 
1113
This option will create a built.generic file, instead of one based on the machine
1138
This option will cause the program to display information about the packaging 
-
 
1139
process and then exit. 
-
 
1140
 
1114
that actually built the package. This is used by the AutoBuilder toolchain.
1141
No data will be transferred to the archive.
1115
 
1142
 
1116
=back
1143
=back
1117
 
1144
 
1118
=head1 DESCRIPTION
1145
=head1 DESCRIPTION
1119
 
1146
 
1120
This utility program is used to transfer a package that has been built into
1147
This utility program is used to transfer a package that has been built into
1121
dpkg_archive. The package is then available for general consumption.
1148
dpkg_archive. The package is then available for general consumption.
1122
 
1149
 
-
 
1150
The utility will perform several operations in the transfer process. These incude:
-
 
1151
 
-
 
1152
=over 4
-
 
1153
 
-
 
1154
=item * 
-
 
1155
 
-
 
1156
Create a tag file to indicate the machine that has performed the transfer
-
 
1157
 
-
 
1158
=item * 
-
 
1159
 
-
 
1160
Create an XML file of files that have been transferred. This file contains information
-
 
1161
used by the build system when it releases the package, including: name, size and MD5SUM.
-
 
1162
 
-
 
1163
=item *
-
 
1164
 
-
 
1165
Detect file conflicts when different builds are merged into a single package. Header files are 
-
 
1166
allowed to differ in line ending style, but other files must not conflict. The package will not be 
-
 
1167
reproducible if file conflicts exist.
-
 
1168
 
-
 
1169
=item *
-
 
1170
 
-
 
1171
Suppress dead symbolic links. A valid symlink will be preserved, but invalid links will be 
-
 
1172
removed from the transferred image.
-
 
1173
 
-
 
1174
=back
-
 
1175
 
1123
=head2 PACKAGE LOCATION
1176
=head2 PACKAGE LOCATION
1124
 
1177
 
1125
The utility will locate a package by examining the following directores for
1178
The utility will locate a package by examining the following directores for
1126
the package description file(descpkg).
1179
the package description file(descpkg).
1127
 
1180