Subversion Repositories DevTools

Rev

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

Rev 2764 Rev 5104
Line 68... Line 68...
68
my $opt_vob;
68
my $opt_vob;
69
my $opt_test;
69
my $opt_test;
70
my $opt_keep;
70
my $opt_keep;
71
my $opt_subdir;
71
my $opt_subdir;
72
my $opt_image;
72
my $opt_image;
-
 
73
my $opt_package;
73
my $opt_repository;
74
my $opt_repository;
74
 
75
 
75
#-------------------------------------------------------------------------------
76
#-------------------------------------------------------------------------------
76
# Function        : Mainline Entry Point
77
# Function        : Mainline Entry Point
77
#
78
#
Line 90... Line 91...
90
                "vob=s"         => \$opt_vob,               # String
91
                "vob=s"         => \$opt_vob,               # String
91
                "test"          => \$opt_test,              # Flag
92
                "test"          => \$opt_test,              # Flag
92
                "keep"          => \$opt_keep,              # Flag
93
                "keep"          => \$opt_keep,              # Flag
93
                "subdir=s"      => \$opt_subdir,            # string
94
                "subdir=s"      => \$opt_subdir,            # string
94
                "image=s"       => \$opt_image,             # string
95
                "image=s"       => \$opt_image,             # string
-
 
96
                "package"       => \$opt_package,           # flag
95
                "repository=s"  => \$opt_repository,        # string
97
                "repository=s"  => \$opt_repository,        # string
96
                );
98
                );
97
 
99
 
98
                #
100
                #
99
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
101
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
Line 124... Line 126...
124
#
126
#
125
Error ("Can only specify either -vob or -repository.") if ( $opt_vob && $opt_repository );
127
Error ("Can only specify either -vob or -repository.") if ( $opt_vob && $opt_repository );
126
Error ("ClearCase mode only supported on WINDOWS, not $::ScmHost") if ( $opt_vob && $::ScmHost ne 'WIN' );
128
Error ("ClearCase mode only supported on WINDOWS, not $::ScmHost") if ( $opt_vob && $::ScmHost ne 'WIN' );
127
Error ("No DPK_ARCHIVE") unless ( $GBE_DPKG );
129
Error ("No DPK_ARCHIVE") unless ( $GBE_DPKG );
128
Error ("Must specify -vob, -repository or -keep") unless ( $opt_vob || $opt_repository || $opt_keep);
130
Error ("Must specify -vob, -repository or -keep") unless ( $opt_vob || $opt_repository || $opt_keep);
-
 
131
Error ("Must specify -image=aaa or -package") unless ( $opt_image || $opt_package );
129
Error ("Need two arguments: package and version") unless ( $#ARGV eq 1 );
132
Error ("Need two arguments: package and version") unless ( $#ARGV eq 1 );
130
 
133
 
131
#
134
#
132
#   Determine base image
135
#   Determine base image
133
#   Either from dpkg_archive or user image
136
#   Either from dpkg_archive or user image
Line 142... Line 145...
142
    #
145
    #
143
    #   Ensure that the package source in dpkg_archive can be found
146
    #   Ensure that the package source in dpkg_archive can be found
144
    #
147
    #
145
    $src_dir = "$GBE_DPKG/$ARGV[0]/$ARGV[1]";
148
    $src_dir = "$GBE_DPKG/$ARGV[0]/$ARGV[1]";
146
    Message ( "Testing $src_dir" );
149
    Message ( "Testing $src_dir" );
147
    Error ("Package not found: $src_dir" ) unless ( -d $src_dir );
150
    Error ("Package not found in dpkg_archive:",$src_dir ) unless ( -d $src_dir );
148
    Message ("Found source package");
151
    Message ("Found source package in dpkg_archive");
149
}
152
}
150
 
153
 
151
#
154
#
152
#   Determine target path with the VOB/Repository
155
#   Determine target path with the VOB/Repository
153
#   Will be taken from the package name, unless provided
156
#   Will be taken from the package name, unless provided
Line 820... Line 823...
820
gen_cots - Create a buildable package from dpkg_archive and place it under
823
gen_cots - Create a buildable package from dpkg_archive and place it under
821
version control
824
version control
822
 
825
 
823
=head1 SYNOPSIS
826
=head1 SYNOPSIS
824
 
827
 
825
jats gen_cots package version [-vob=aa|-repo=aa|-keep]
828
jats gen_cots package version [-vob=aa|-repo=aa|-keep] [-image=aaa|-package]
826
 
829
 
827
 Options:
830
 Options:
828
    -help              - brief help message
831
    -help              - brief help message
829
    -help -help        - Detailed help message
832
    -help -help        - Detailed help message
830
    -man               - Full documentation
833
    -man               - Full documentation
Line 833... Line 836...
833
    -keep              - Keep the creating dpkg_archive image
836
    -keep              - Keep the creating dpkg_archive image
834
    -label=name        - Specify a label for the versions source
837
    -label=name        - Specify a label for the versions source
835
    -subdir=nnn        - Named subdir in VOB
838
    -subdir=nnn        - Named subdir in VOB
836
    -test              - Do not perform operations that modify Version Control
839
    -test              - Do not perform operations that modify Version Control
837
    -image=path        - Path to alternate source image
840
    -image=path        - Path to alternate source image
-
 
841
    -package           - Locate image in package archive
838
 
842
 
839
=head1 OPTIONS
843
=head1 OPTIONS
840
 
844
 
841
=over 8
845
=over 8
842
 
846
 
Line 907... Line 911...
907
No files will be checked in and the label will not be locked.
911
No files will be checked in and the label will not be locked.
908
 
912
 
909
=item B<-image=path>
913
=item B<-image=path>
910
 
914
 
911
If this option is specified then the package will be created using the
915
If this option is specified then the package will be created using the
912
specified source path, otherwise the package will be extracted from dpkg_archive.
916
specified source path.
913
 
917
 
914
This option allows a locally created image to be stored as a COTS package
918
This option allows a locally created image to be stored as a COTS package
915
before it is placed in dpkg_archive.
919
before it is placed in dpkg_archive.
916
 
920
 
-
 
921
Either the -image or the -package option must be specified.
-
 
922
 
-
 
923
=item B<-image=path>
-
 
924
 
-
 
925
If this option is specified then the package image will be extracted from dpkg_archive.
-
 
926
 
-
 
927
Either the -image or the -package option must be specified.
-
 
928
 
917
=back
929
=back
918
 
930
 
919
=head1 DESCRIPTION
931
=head1 DESCRIPTION
920
 
932
 
921
This program will create a version controlled and JATS buildable package from
933
This program will create a version controlled and JATS buildable package from
Line 963... Line 975...
963
 
975
 
964
=head1 EXAMPLE
976
=head1 EXAMPLE
965
 
977
 
966
=head2 ClearCase
978
=head2 ClearCase
967
 
979
 
968
    jats etool gen_cots -vob=z:/COTS mos_api 5.6.0.cr
980
    jats etool gen_cots -vob=z:/COTS mos_api 5.6.0.cr -package
969
 
981
 
970
This will take the version 5.6.0.cr of the mos_api package from dpkg_archive
982
This will take the version 5.6.0.cr of the mos_api package from dpkg_archive
971
place it under version control within the COTS vob and add files to allow the
983
place it under version control within the COTS vob and add files to allow the
972
dpkg_archive package to be recreated in an JATS buildable manner.
984
dpkg_archive package to be recreated in an JATS buildable manner.
973
 
985
 
974
=head2 Subversion
986
=head2 Subversion
975
 
987
 
976
    jats etool gen_cots -repository=AUPERASVN01/COTS mos_api 5.6.0.cr
988
    jats etool gen_cots -repository=AUPERASVN01/COTS mos_api 5.6.0.cr -image=mos_api_5_6_0_cr
977
 
989
 
978
This will take the version 5.6.0.cr of the mos_api package from dpkg_archive
990
This will take the image in the specified directory ( which must be in a dpkg_archive complient fomat) and
979
place it under version control within the COTS Repository and add files to allow
991
place it under version control within the COTS Repository and add files to allow the image to be
980
the dpkg_archive package to be recreated in an JATS buildable manner.
992
recreated in dpkg_archive in a JATS buildable manner as a package called mos_api with a version of 5.6.0.cr.
981
 
993
 
982
=cut
994
=cut
983
 
995