Subversion Repositories DevTools

Rev

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

Rev 4424 Rev 4549
Line 1... Line 1...
1
########################################################################
1
########################################################################
2
# Copyright (C) 2008 ERG Limited, All rights reserved
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
#
3
#
4
# Module name   : create_dpkg.pl
4
# Module name   : create_dpkg2.pl
5
# Module type   : JATS Utility
5
# Module type   : Makefile system
6
# Compiler(s)   : Perl
6
# Compiler(s)   : Perl
7
# Environment(s): JATS
7
# Environment(s): jats
8
#
8
#
9
# Description   : This script is used to create a dpkg_archive.
9
# Description   : This script is used to create a dpkg_archive.
-
 
10
#                 Based on create_dpkg with following changes
-
 
11
#                   * No user interaction
-
 
12
#                   * Generates files list for ReleaseNote integration 
10
#
13
#
11
# Usage         : See POD
14
# Usage:        : See POD
12
#
15
#
13
#......................................................................#
16
#......................................................................#
14
 
17
 
-
 
18
 
15
require 5.008_002;
19
require 5.008_002;
16
 
20
 
17
# Include Standard Perl Functions
21
# Include Standard Perl Functions
18
#
22
#
19
use strict;
23
use strict;
Line 24... Line 28...
24
use File::Find;
28
use File::Find;
25
use File::Path;
29
use File::Path;
26
use File::Copy;
30
use File::Copy;
27
use Pod::Usage;
31
use Pod::Usage;
28
use Digest::MD5;
32
use Digest::MD5;
-
 
33
use XML::Simple;
29
 
34
 
30
use JatsError;
35
use JatsError;
31
use JatsEnv;
36
use JatsEnv;
32
use DescPkg;
37
use DescPkg;
33
use FileUtils;
38
use FileUtils;
Line 38... Line 43...
38
#
43
#
39
my $Win32 = eval "require Win32::FileSecurity";
44
my $Win32 = eval "require Win32::FileSecurity";
40
 
45
 
41
# define Global variables
46
# define Global variables
42
#
47
#
43
my $VERSION = "2.4.1";
48
my $VERSION = "3.0.0";
44
my $PROGNAME = "create_dpkg.pl";
49
my $PROGNAME = "create_dpkg.pl";
45
 
50
 
46
# Globals imported from environment
51
# Globals imported from environment
47
#
52
#
48
our $GBE_MACHTYPE;
53
our $GBE_MACHTYPE;
Line 60... Line 65...
60
my $CWD_DIR       = cwd;
65
my $CWD_DIR       = cwd;
61
my $SRC_ROOT;
66
my $SRC_ROOT;
62
my $DPKG_DIR;
67
my $DPKG_DIR;
63
my $DPKG_ROOT;
68
my $DPKG_ROOT;
64
my $PKG_BASE;
69
my $PKG_BASE;
65
my $e_repository = "";
-
 
66
my $bad_merge_count = 0;
70
my $bad_merge_count = 0;
67
my @bad_symlinks;
71
my @bad_symlinks;
-
 
72
my @fileList;
-
 
73
my $descPkgCount = 0;
68
 
74
 
69
#
75
#
70
#   Option variables
76
#   Option variables
71
#
77
#
72
my $opt_help = 0;
78
my $opt_help = 0;
73
my $opt_manual = 0;
79
my $opt_manual = 0;
74
my $opt_verbose = 0;
80
my $opt_verbose = 0;
75
my $opt_quiet = 0;
81
my $opt_quiet = 0;
-
 
82
my $opt_delete = 0;
76
my $opt_override = 0;
83
my $opt_override = 0;
77
my $opt_merge = 0;
84
my $opt_merge = 0;
78
my $opt_archive;
85
my $opt_archive;
79
my $opt_generic;
86
my $opt_generic;
80
my $opt_pname;
87
my $opt_pname;
81
my $opt_pversion;
88
my $opt_pversion;
82
my $opt_test;
89
my $opt_test;
83
my $opt_md5 = 1;
90
my $opt_md5 = 1;
-
 
91
my $opt_outfile;
-
 
92
my $opt_info;
84
 
93
 
85
 
94
 
86
#
95
#
87
#   Structure to translate -archive=xxx option to archive variable
96
#   Structure to translate -archive=xxx option to archive variable
88
#   These are the various dpkg_archives known to JATS
97
#   These are the various dpkg_archives known to JATS
Line 112... Line 121...
112
    $file =~ s/$DPKG_ROOT/DPKG/;
121
    $file =~ s/$DPKG_ROOT/DPKG/;
113
 
122
 
114
    Information (sprintf( "%-15s [%s]", $opr, $file));
123
    Information (sprintf( "%-15s [%s]", $opr, $file));
115
}
124
}
116
 
125
 
-
 
126
#-------------------------------------------------------------------------------
-
 
127
# Function        : addFile 
-
 
128
#
-
 
129
# Description     : Add a file to the list of transferred files
-
 
130
#
-
 
131
# Inputs          : $type           - File type
-
 
132
#                   $source         - Source file - full path
-
 
133
#                                     Use local copy, not network copy for file ops
-
 
134
#                   $target         - Target file name
-
 
135
#                   $md5sum         - Precalculated MD5 sum 
-
 
136
#
-
 
137
# Returns         : 
-
 
138
#
-
 
139
sub addFile
-
 
140
{
-
 
141
    my ($type, $source, $target, $md5sum) = @_;
-
 
142
    my %data;
-
 
143
 
-
 
144
    if ((not defined $md5sum) && ($type eq 'file'))
-
 
145
    {
-
 
146
        Verbose("Calculate MD5 Digest: $source");
-
 
147
        open(my $fh , $source) or Error ("Can't open '$source': $!");
-
 
148
        binmode $fh, ':crlf';
-
 
149
        $md5sum = Digest::MD5->new->addfile($fh)->hexdigest;
-
 
150
        close $fh;
-
 
151
    }
-
 
152
 
-
 
153
    $target =~ s~$DPKG_DIR~~;
-
 
154
    $target =~ s~^/~~;
-
 
155
    $target =~ s~/$~~;
-
 
156
 
-
 
157
    if ($type eq 'dir')
-
 
158
    {
-
 
159
        $data{path} = $target;
-
 
160
    }
-
 
161
    else
-
 
162
    {
-
 
163
        $data{path} = StripFileExt($target);
-
 
164
        $data{name} = StripDir($target);
-
 
165
        if ($type eq 'file')
-
 
166
        {
-
 
167
            $data{size} = (stat($source))[7];
-
 
168
            $data{md5sum} = $md5sum;
-
 
169
        }
-
 
170
    }
-
 
171
 
-
 
172
    $data{fullname} = $target;
-
 
173
    $data{type} = $type;
-
 
174
    $data{machtype} = $GBE_MACHTYPE;
-
 
175
    $data{host} = $GBE_HOSTNAME;
-
 
176
 
-
 
177
    # Put a nice '/' on the end of the patch elements
-
 
178
    $data{path} .= '/'
-
 
179
        if ( exists ($data{path}) && length($data{path}) > 0);
-
 
180
 
-
 
181
    push @fileList, \%data;
-
 
182
}
-
 
183
 
-
 
184
#-------------------------------------------------------------------------------
-
 
185
# Function        : writeFileInfo 
-
 
186
#
-
 
187
# Description     : Write out an XML file that contains this processes
-
 
188
#                   contribution to the output package 
-
 
189
#
-
 
190
# Inputs          : 
-
 
191
#
-
 
192
# Returns         : 
-
 
193
#
-
 
194
sub writeFileInfo
-
 
195
{
-
 
196
    my $data;
-
 
197
    $data->{file} = \@fileList;
-
 
198
 
-
 
199
    #
-
 
200
    #   Write out sections of XML
-
 
201
    #       Want control over the output order
-
 
202
    #       Use lots of attributes and only elements for arrays
-
 
203
    #       Save as one attribute per line - for readability
-
 
204
    #
-
 
205
    $opt_outfile = $opt_generic ? "$DPKG_DIR/built.files.generic.xml" : "$DPKG_DIR/built.files.$GBE_HOSTNAME.xml";
-
 
206
 
-
 
207
    LogFileOp ('Meta File', $opt_outfile);
-
 
208
    my $xs = XML::Simple->new( NoAttr =>0, AttrIndent => 1 );
-
 
209
 
-
 
210
    open (my $XML, '>', $opt_outfile) || Error ("Cannot create output file: $opt_outfile", $!);
-
 
211
    $xs->XMLout($data, 
-
 
212
                'RootName' => 'files', 
-
 
213
                'XMLDecl'  => '<?xml version="1.0" encoding="UTF-8"?>',
-
 
214
                'OutputFile' => $XML);
-
 
215
    close $XML;
-
 
216
 
-
 
217
}
-
 
218
 
117
#------------------------------------------------------------------------------
219
#------------------------------------------------------------------------------
118
sub Init
220
sub Init
119
#
221
#
120
# Description:
222
# Description:
121
#     This function is used to process any command line arguements
223
#     This function is used to process any command line arguements
Line 126... Line 228...
126
    # Process any command line arguements...
228
    # Process any command line arguements...
127
    my $result = GetOptions (
229
    my $result = GetOptions (
128
                "help:+"        => \$opt_help,              # flag, multiple use allowed
230
                "help:+"        => \$opt_help,              # flag, multiple use allowed
129
                "manual:3"      => \$opt_help,              # flag
231
                "manual:3"      => \$opt_help,              # flag
130
                "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)
131
                "override!"     => \$opt_override,          # [no]flag
234
                "delete!"       => \$opt_delete,            # [no]flag
132
                "merge|m!"      => \$opt_merge,             # [no]flag.
235
                "merge|m!"      => \$opt_merge,             # [no]flag.
133
                "archive=s"     => \$opt_archive,           # string
236
                "archive=s"     => \$opt_archive,           # string
134
                "quiet+"        => \$opt_quiet,             # Flag
237
                "quiet+"        => \$opt_quiet,             # Flag
135
                "generic!"      => \$opt_generic,           # [no]Flag
238
                "generic!"      => \$opt_generic,           # [no]Flag
136
                "pname=s"       => \$opt_pname,             # string
239
                "pname=s"       => \$opt_pname,             # string
137
                "pversion=s"    => \$opt_pversion,          # string
240
                "pversion=s"    => \$opt_pversion,          # string
138
                "test!"         => \$opt_test,              # [no]flag
241
                "test!"         => \$opt_test,              # [no]flag
139
                "md5!"          => \$opt_md5,               # [no]flag
242
                "md5!"          => \$opt_md5,               # [no]flag
-
 
243
                "info!"         => \$opt_info,              # [no]flag
140
                );
244
                );
141
 
245
 
142
 
246
 
143
    #
247
    #
144
    #   Process help and manual options
248
    #   Process help and manual options
Line 236... Line 340...
236
        unless $DPKG_ROOT;
340
        unless $DPKG_ROOT;
237
 
341
 
238
    Error("Failed to find Repository: $DPKG_ROOT")
342
    Error("Failed to find Repository: $DPKG_ROOT")
239
        unless ( -d $DPKG_ROOT );
343
        unless ( -d $DPKG_ROOT );
240
 
344
 
241
    $e_repository = ("      *Non Standard archive")
-
 
242
        unless ( $opt_archive eq 'main' );
-
 
243
 
-
 
244
 
-
 
245
    #   Locate the package
345
    #   Locate the package
246
    #   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
247
    #   main package directory.
347
    #   main package directory.
248
    #
348
    #
249
    #   This installation process only handles one such file
349
    #   This installation process only handles one such file
250
    #
350
    #
-
 
351
    $descPkgCount = 0;
251
    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
    }
252
}
358
}
253
 
359
 
254
#-------------------------------------------------------------------------------
360
#-------------------------------------------------------------------------------
255
# Function        : CheckDescPkg
361
# Function        : CheckDescPkg
256
#
362
#
Line 352... Line 458...
352
    Information ("Version: $VERSION");
458
    Information ("Version: $VERSION");
353
    Information ("");
459
    Information ("");
354
    Information ("Information:");
460
    Information ("Information:");
355
    Information ("Working dir   = [$CWD_DIR]");
461
    Information ("Working dir   = [$CWD_DIR]");
356
    Information ("Package Root  = [$SRC_ROOT]");
462
    Information ("Package Root  = [$SRC_ROOT]");
357
    Information ("Repository    = [$DPKG_ROOT]$e_repository");
463
    Information ("Repository    = [$DPKG_ROOT]");
-
 
464
    Information ("                *Non Standard archive") unless $opt_archive eq 'main';
358
    Information ("Target dir    = [$DPKG_DIR]");
465
    Information ("Target dir    = [$DPKG_DIR]");
359
    Information1("DPKG_NAME     = [$DPKG_NAME]");
466
    Information1("DPKG_NAME     = [$DPKG_NAME]");
360
    Information1("DPKG_VERSION  = [$DPKG_VERSION]");
467
    Information1("DPKG_VERSION  = [$DPKG_VERSION]");
361
    Information1("GBE_MACHTYPE  = [$GBE_MACHTYPE]");
468
    Information1("GBE_MACHTYPE  = [$GBE_MACHTYPE]");
362
    Information1("GBE_HOSTNAME  = [$GBE_HOSTNAME]");
469
    Information1("GBE_HOSTNAME  = [$GBE_HOSTNAME]");
363
    Information1("GBE_ABT       = [$GBE_ABT]");
470
    Information1("GBE_ABT       = [$GBE_ABT]");
364
    Information1("USER          = [$USER]");
471
    Information1("USER          = [$USER]");
365
    Information ("")                                if ( $opt_merge || $opt_override );
472
    Information ("")                                if ( $opt_merge || $opt_delete || $opt_info);
366
    Information ("Opt:Override  = Enabled")         if ( $opt_override );
473
    Information ("Opt:Delete    = Enabled")         if ( $opt_delete );
367
    Information ("Opt:Merge     = Enabled")         if ( $opt_merge );
474
    Information ("Opt:Merge     = Enabled")         if ( $opt_merge );
368
    Information ("Opt:TestMode  = Enabled. No Package Transferred") if ( $opt_test );
475
    Information ("Opt:TestMode  = Enabled. No Package Transferred") if ( $opt_test );
-
 
476
    Information ("Opt:Info      = Enabled. No Package Transferred") if ( $opt_info );
369
    Warning     ("Sandbox Build = Yes") if ($ENV{GBE_DPKG_SBOX}) ;
477
    Warning     ("Sandbox Build = Yes") if ($ENV{GBE_DPKG_SBOX}) ;
370
    Information ("---------------------------------------------------------------");
478
    Information ("---------------------------------------------------------------");
371
 
479
 
372
    #
480
    #
373
    #   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 411... Line 519...
411
    # so our start dir.
519
    # so our start dir.
412
 
520
 
413
    # we need to determine which file we are dealing with
521
    # we need to determine which file we are dealing with
414
    if ( ! -d $item && $file =~ /^descpkg$/ )
522
    if ( ! -d $item && $file =~ /^descpkg$/ )
415
    {
523
    {
-
 
524
        $descPkgCount++;
-
 
525
 
416
        #
526
        #
417
        #   Only grab the first one
527
        #   Only grab the first one
418
        #
528
        #
419
        if ( $DESCPKG_FILE )
529
        if ( $DESCPKG_FILE )
420
        {
530
        {
-
 
531
            $item =~ s~$PKG_BASE/~~;
421
            Warning ("Package contains multiple descpkg files");
532
            Verbose ("Multiple descpkg files:", $item );
422
            return;
533
            return;
423
        }
534
        }
424
 
535
 
425
        $DESCPKG_FILE = $item;
536
        $DESCPKG_FILE = $item;
426
        my($dir)= File::Basename::dirname($item);
537
        my($dir)= File::Basename::dirname($item);
Line 503... Line 614...
503
    # first we need to ensure we have the top level directory
614
    # first we need to ensure we have the top level directory
504
    #
615
    #
505
    if ( -d $DPKG_DIR )
616
    if ( -d $DPKG_DIR )
506
    {
617
    {
507
        Warning("Detected previous dpkg_archive [$DPKG_DIR]");
618
        Warning("Detected previous dpkg_archive [$DPKG_DIR]");
508
        unless ( $opt_override )
-
 
509
        {
-
 
510
            Error ("Package already exists") if ( $opt_quiet );
619
        Error ("Package already exists and Package merging not selected")
511
            if ( !GetYesNo("Do you wish to continue?") )
620
            unless ( $opt_delete || $opt_merge );
512
            {
-
 
513
                Error("Script terminated by user.");
-
 
514
            }
-
 
515
        }
-
 
516
 
621
 
517
        #
622
        #
518
        #   Target exists
623
        #   Target exists
519
        #   Unless we are merging, we need to blow the entire tree away
624
        #   Unless we are merging, we need to blow the entire tree away
520
        #
625
        #
Line 646... Line 751...
646
        #
751
        #
647
        if ( ! -d "$target" )
752
        if ( ! -d "$target" )
648
        {
753
        {
649
            LogFileOp("Creating Dir", $target);
754
            LogFileOp("Creating Dir", $target);
650
            mkpath("$target", 0, 0775);
755
            mkpath("$target", 0, 0775);
-
 
756
            addFile('dir', $item , $target);
651
        }
757
        }
652
    }
758
    }
653
    else
759
    else
654
    {
760
    {
655
        #
761
        #
Line 659... Line 765...
659
        unless ( $opt_merge && -f $target )
765
        unless ( $opt_merge && -f $target )
660
        {
766
        {
661
            if ( $item =~ m~/descpkg$~ )
767
            if ( $item =~ m~/descpkg$~ )
662
            {
768
            {
663
                LogFileOp("Rewrite File",$target);
769
                LogFileOp("Rewrite File",$target);
664
                TransferDescpkg( "$item", $target );
770
                TransferDescpkg( $item, $target );
665
                CORE::chmod oct("0664"), $target;
771
                CORE::chmod oct("0664"), $target;
-
 
772
                addFile('file', $item, $target);
666
            }
773
            }
667
            else
774
            else
668
            {
775
            {
669
                #
776
                #
670
                #   Copy file to destination
777
                #   Copy file to destination
Line 682... Line 789...
682
                        symlink ($link, $target );
789
                        symlink ($link, $target );
683
                        unless ( $link && -l $target )
790
                        unless ( $link && -l $target )
684
                        {
791
                        {
685
                            Error("Failed to copy link [$item] to [$target]: $!");
792
                            Error("Failed to copy link [$item] to [$target]: $!");
686
                        }
793
                        }
-
 
794
                        addFile('link', $item , $target);
687
                    }
795
                    }
688
                    else
796
                    else
689
                    {
797
                    {
690
                        # Don't copy broken Symlinks
798
                        # Don't copy broken Symlinks
691
                        # Perhaps this should be an error - but is will break escrow builds
799
                        # Perhaps this should be an error - but is will break escrow builds
Line 709... Line 817...
709
                    }
817
                    }
710
                    else
818
                    else
711
                    {
819
                    {
712
                        CORE::chmod oct("0775"), $target;
820
                        CORE::chmod oct("0775"), $target;
713
                    }
821
                    }
-
 
822
                    addFile('file', $item, $target);
714
                }
823
                }
715
                else
824
                else
716
                {
825
                {
717
                    Error("Failed to copy file [$item] to [$target]: $!");
826
                    Error("Failed to copy file [$item] to [$target]: $!");
718
                }
827
                }
Line 727... Line 836...
727
            #
836
            #
728
            if ( $item =~ m~/descpkg$~ )
837
            if ( $item =~ m~/descpkg$~ )
729
            {
838
            {
730
                LogFileOp("Touch File",$target);
839
                LogFileOp("Touch File",$target);
731
                TouchFile( $target ) && Error ( "Failed to touch: $target" );
840
                TouchFile( $target ) && Error ( "Failed to touch: $target" );
-
 
841
                addFile('merge', $item, $target);
732
            }
842
            }
733
            else
843
            else
734
            {
844
            {
735
                #
845
                #
736
                #   MD5 digest the files that are being merged
846
                #   MD5 digest the files that are being merged
Line 762... Line 872...
762
                    unless ( $source_md5 eq $target_md5 )
872
                    unless ( $source_md5 eq $target_md5 )
763
                    {
873
                    {
764
                        $msg = "DIFF: Merge Test File";
874
                        $msg = "DIFF: Merge Test File";
765
                        $bad_merge_count ++;
875
                        $bad_merge_count ++;
766
                    }
876
                    }
-
 
877
                    addFile('merge', $item, $target, $target_md5);
767
                }
878
                }
768
                LogFileOp($msg,$target);
879
                LogFileOp($msg,$target);
769
            }
880
            }
770
        }
881
        }
771
    }
882
    }
772
}
883
}
773
 
884
 
774
 
-
 
775
# -------------------------------------------------------------------------
-
 
776
sub GetYesNo
-
 
777
#
-
 
778
# -------------------------------------------------------------------------
-
 
779
{
-
 
780
    my ($question) = @_;
-
 
781
    my ($u_tmp) = "";
-
 
782
    Question ("$question, (default: y) [y,n]: ");
-
 
783
 
-
 
784
    while ( <STDIN> )
-
 
785
    {
-
 
786
        $u_tmp = $_;
-
 
787
        chomp($u_tmp);
-
 
788
 
-
 
789
        return 1
-
 
790
            if ( "$u_tmp" eq "" );
-
 
791
 
-
 
792
        if( $u_tmp =~ /[yn]{1}/i )
-
 
793
        {
-
 
794
            return ( "$u_tmp" eq "y" );
-
 
795
        }
-
 
796
        else
-
 
797
        {
-
 
798
            Question("Please re-enter response? (default: y) [y,n]: ");
-
 
799
        }
-
 
800
    }
-
 
801
}
-
 
802
 
-
 
803
#-------------------------------------------------------------------------------
885
#-------------------------------------------------------------------------------
804
# Function        : TestDpkgArchive
886
# Function        : TestDpkgArchive
805
#
887
#
806
# Description     : Test the structure of the source achive
888
# Description     : Test the structure of the source achive
807
#                   Ensure that it has some files
889
#                   Ensure that it has some files
Line 890... Line 972...
890
# Initialise our world
972
# Initialise our world
891
#
973
#
892
Init();
974
Init();
893
CheckDescPkg();
975
CheckDescPkg();
894
ShowInfo();
976
ShowInfo();
895
 
-
 
896
 
-
 
897
# Check with the user they want to proceed
-
 
898
#
-
 
899
unless ( $opt_test )
977
unless ($opt_info)
900
{
978
{
901
    Information("Creating dpkg_archive package:", $DPKG_DIR);
-
 
902
    unless( $opt_override || $opt_quiet )
979
    unless ( $opt_test )
903
    {
980
    {
904
        if ( !GetYesNo( "Do you wish to continue?" ) )
981
        Information("Creating dpkg_archive package:", $DPKG_DIR);
-
 
982
        CreateDpkgArchive();
-
 
983
        writeFileInfo();
-
 
984
    }
-
 
985
    else
905
        {
986
    {
906
            Error ("Script terminated by user.");
987
        Information("Testing user package.");
907
        }
988
        TestDpkgArchive();
908
    }
989
    }
909
 
-
 
910
    # Create the archive and copy the files
-
 
911
    #
-
 
912
    CreateDpkgArchive();
-
 
913
}
-
 
914
else
-
 
915
{
-
 
916
    TestDpkgArchive();
-
 
917
}
990
}
918
 
991
 
919
# Done
992
# Done
920
#
993
#
921
Information ("Done.");
994
Information ("Done.");
Line 942... Line 1015...
942
    -help              - Brief help message
1015
    -help              - Brief help message
943
    -help -help        - Detailed help message
1016
    -help -help        - Detailed help message
944
    -man               - Full documentation
1017
    -man               - Full documentation
945
    -quiet             - Suppress progress messages, then warning messages
1018
    -quiet             - Suppress progress messages, then warning messages
946
    -verbose           - Display additional progress messages
1019
    -verbose           - Display additional progress messages
-
 
1020
    -override          - Deprecated option
947
    -override          - Override any previous version of the package
1021
    -delete            - Delete any previous version of the package
948
    -[no]merge         - merge with existing version of the package
1022
    -[no]merge         - merge with existing version of the package
949
    -archive=name      - Specify archive (cache, local, main, store, sandbox, deploy)
1023
    -archive=name      - Specify archive (cache, local, main, store, sandbox, deploy)
950
    -pname=name        - Ensure package is named correctly
1024
    -pname=name        - Ensure package is named correctly
951
    -pversion=version  - Ensure package version is correct
1025
    -pversion=version  - Ensure package version is correct
952
    -generic           - Create a built.generic file
1026
    -generic           - Create a built.generic file
953
    -[no]test          - Test package. Do not transfer.
-
 
954
    -[no]md5           - Use MD5 comparison of merged files(enabled)
1027
    -[no]md5           - Use MD5 comparison of merged files(enabled)
955
    
-
 
-
 
1028
    -[no]test          - Test package. Do not transfer.
-
 
1029
    -[no]info          - Display packaging info. Do not transfer.
956
 
1030
 
957
=head1 OPTIONS
1031
=head1 OPTIONS
958
 
1032
 
959
=over 8
1033
=over 8
960
 
1034
 
Line 976... Line 1050...
976
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
977
script.
1051
script.
978
 
1052
 
979
=item B<-override>
1053
=item B<-override>
980
 
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
 
-
 
1060
=item B<-delete>
-
 
1061
 
981
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
982
be deleted, without any user intervention.
1063
be deleted.
983
 
1064
 
984
=item B<-merge>
1065
=item B<-merge>
985
 
1066
 
986
If this option is enabled then the package will be merged with any existing
1067
If this option is enabled then the package will be merged with any existing
987
package, without any user intervention. This option is used by the auto build
1068
package. This option is used by the auto build tool to assemble multi-machine 
988
tool to assemble multi-machine packages in dpkg_archive.
1069
packages in dpkg_archive.
989
 
1070
 
990
=item B<-archive=name>
1071
=item B<-archive=name>
991
 
1072
 
992
This option specifies the destination archive to be used. The following names
1073
This option specifies the destination archive to be used. The following names
993
are supported:
1074
are supported:
Line 1030... Line 1111...
1030
=item B<-pversion=version>
1111
=item B<-pversion=version>
1031
 
1112
 
1032
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
1033
that expected.
1114
that expected.
1034
 
1115
 
1035
=item B<-test>
1116
=item B<-generic>
1036
 
1117
 
1037
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
1038
it will not perform the copy.
1119
that actually built the package. This is used by the AutoBuilder toolchain.
1039
 
1120
 
1040
=item B<-[no]md5>
1121
=item B<-[no]md5>
1041
 
1122
 
1042
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
1043
an MD5 digest over the current and the existing file.
1124
an MD5 digest over the current and the existing file.
Line 1045... Line 1126...
1045
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.
1046
 
1127
 
1047
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
1048
reported.
1129
reported.
1049
 
1130
 
1050
=item B<-generic>
1131
=item B<-test>
1051
 
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
 
1052
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
 
1053
that actually built the package. This is used by the AutoBuilder toolchain.
1141
No data will be transferred to the archive.
1054
 
1142
 
1055
=back
1143
=back
1056
 
1144
 
1057
=head1 DESCRIPTION
1145
=head1 DESCRIPTION
1058
 
1146
 
1059
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
1060
dpkg_archive. The package is then available for general consumption.
1148
dpkg_archive. The package is then available for general consumption.
1061
 
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
 
1062
=head2 PACKAGE LOCATION
1176
=head2 PACKAGE LOCATION
1063
 
1177
 
1064
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
1065
the package description file(descpkg).
1179
the package description file(descpkg).
1066
 
1180