Subversion Repositories DevTools

Rev

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

Rev 6511 Rev 6619
Line 103... Line 103...
103
our $BUILD_UUID             = time() . substr(rand(),2); # Build Unique Identifier
103
our $BUILD_UUID             = time() . substr(rand(),2); # Build Unique Identifier
104
 
104
 
105
my  $DeleteDPACKAGE         = 0;                # Must clobber DPACKAGE
105
my  $DeleteDPACKAGE         = 0;                # Must clobber DPACKAGE
106
my  $build_source_pkg       = 0;                # Flag to build source package
106
my  $build_source_pkg       = 0;                # Flag to build source package
107
my  $opt_help               = 0;
107
my  $opt_help               = 0;
-
 
108
my  $opt_localCache         = 0;                # Create cache within the interface directory
108
my  $sandbox_exact          = 0;                # Exact or in-exact sandbox
109
my  $sandbox_exact          = 0;                # Exact or in-exact sandbox
109
my  $pkgFromSandbox         = 0;                # Flags that we have imported a package from a sandbox
110
my  $pkgFromSandbox         = 0;                # Flags that we have imported a package from a sandbox
110
 
111
 
111
my  $genToolsetPlatform     = 0;                # BuildToolset directive has been seen
112
my  $genToolsetPlatform     = 0;                # BuildToolset directive has been seen
112
my  $genToolsetActive       = 0;                # TOOLSET platform required:1, Error:2
113
my  $genToolsetActive       = 0;                # TOOLSET platform required:1, Error:2
Line 172... Line 173...
172
                             "package"       => \$NoPackageError,
173
                             "package"       => \$NoPackageError,
173
                             "nopackages"    => \$IgnorePkgs,
174
                             "nopackages"    => \$IgnorePkgs,
174
                             "forcebuildpkg" => \$ForceBuildPkg,
175
                             "forcebuildpkg" => \$ForceBuildPkg,
175
                             "force!"        => \$ForceBuild,
176
                             "force!"        => \$ForceBuild,
176
                             "generic!"      => \$GenericBuild,
177
                             "generic!"      => \$GenericBuild,
-
 
178
                             "localcache!"   => \$opt_localCache,
177
                             );
179
                             );
178
    Usage() if ( $opt_help || !$result );
180
    Usage() if ( $opt_help || !$result );
179
 
181
 
180
    Debug( "Host:          ", $ScmHost );
182
    Debug( "Host:          ", $ScmHost );
181
    Debug( "Cwd:           ", $CwdFull );
183
    Debug( "Cwd:           ", $CwdFull );
Line 190... Line 192...
190
    Debug( "package:       ", $NoPackageError );
192
    Debug( "package:       ", $NoPackageError );
191
    Debug( "ForcePkg  :    ", $ForceBuildPkg );
193
    Debug( "ForcePkg  :    ", $ForceBuildPkg );
192
    Debug( "ForceBuild :   ", $ForceBuild );
194
    Debug( "ForceBuild :   ", $ForceBuild );
193
    Debug( "IgnorePkgs :   ", $IgnorePkgs );
195
    Debug( "IgnorePkgs :   ", $IgnorePkgs );
194
    Debug( "GenericTest :  ", $GenericBuild );
196
    Debug( "GenericTest :  ", $GenericBuild );
-
 
197
    Debug( "LocalCache :   ", $opt_localCache );
195
 
198
 
196
#.. Command
199
#.. Command
197
#
200
#
198
 
201
 
199
    $CmdSwitch = (lc shift @ARGV) if @ARGV;
202
    $CmdSwitch = (lc shift @ARGV) if @ARGV;
Line 1870... Line 1873...
1870
 
1873
 
1871
    } else {
1874
    } else {
1872
        push @createDirs, "$ifdirname/include";
1875
        push @createDirs, "$ifdirname/include";
1873
        $BUILDINTERFACE = $ifdirname;
1876
        $BUILDINTERFACE = $ifdirname;
1874
        $::ScmInterface = $ifdirname;
1877
        $::ScmInterface = $ifdirname;
-
 
1878
 
-
 
1879
        #
-
 
1880
        #   Set up the local cache
-
 
1881
        #
-
 
1882
        my $iCache = "$ifdirname/dpkg_cache";
-
 
1883
        if ($BUILDINTERFACE && $opt_localCache) {
-
 
1884
            my $iCache = "$ifdirname/dpkg_cache";
-
 
1885
            push @createDirs, $iCache;
-
 
1886
 
-
 
1887
            $Cache = $opt_localCache;
-
 
1888
            $::GBE_DPKG_CACHE = FullPath($iCache);
-
 
1889
            $ENV{GBE_DPKG_CACHE} = $::GBE_DPKG_CACHE; 
-
 
1890
        } elsif (-d  $iCache ){
-
 
1891
            #$Cache = 1 if $Cache == 0;
-
 
1892
            $::GBE_DPKG_CACHE = FullPath($iCache);
-
 
1893
            $ENV{GBE_DPKG_CACHE} = $::GBE_DPKG_CACHE; 
-
 
1894
        }
1875
    }
1895
    }
1876
 
1896
 
1877
    unless ($Clobber) {
1897
    unless ($Clobber) {
1878
        push @createDirs, "$ifdirname/bin";
1898
        push @createDirs, "$ifdirname/bin";
1879
        push @createDirs, "$ifdirname/lib";
1899
        push @createDirs, "$ifdirname/lib";
Line 2186... Line 2206...
2186
        #   version as having been used. Used by cache cleanup algorithms
2206
        #   version as having been used. Used by cache cleanup algorithms
2187
        #
2207
        #
2188
        if ( $isa_cache  )
2208
        if ( $isa_cache  )
2189
        {
2209
        {
2190
            TouchFile ( "$pkg/used.cache", "Marks the cache copy as being used");
2210
            TouchFile ( "$pkg/used.cache", "Marks the cache copy as being used");
-
 
2211
            #print( "                  Cached -> $pkg\n" );
2191
        }
2212
        }
2192
 
2213
 
2193
        #
2214
        #
2194
        #   Use the first suitable package found
2215
        #   Use the first suitable package found
2195
        #..
2216
        #..
Line 2854... Line 2875...
2854
#
2875
#
2855
# Returns         : Undefined
2876
# Returns         : Undefined
2856
#
2877
#
2857
sub BuildReleaseFile
2878
sub BuildReleaseFile
2858
{
2879
{
-
 
2880
    Warning("BuildReleaseFile directive does nothing and should be removed") unless $Clobber;
2859
}
2881
}
2860
 
2882
 
2861
#-------------------------------------------------------------------------------
2883
#-------------------------------------------------------------------------------
2862
# Function        : BuildSnapshot
2884
# Function        : BuildSnapshot
2863
#
2885
#
Line 2869... Line 2891...
2869
#
2891
#
2870
# Returns         : Undefined
2892
# Returns         : Undefined
2871
#
2893
#
2872
sub BuildSnapshot
2894
sub BuildSnapshot
2873
{
2895
{
-
 
2896
    Warning("BuildSnapshot directive does nothing and should be removed") unless $Clobber;
2874
}
2897
}
2875
 
2898
 
2876
#-------------------------------------------------------------------------------
2899
#-------------------------------------------------------------------------------
2877
# Function        : BuildSrcArchive
2900
# Function        : BuildSrcArchive
2878
#
2901
#
Line 3070... Line 3093...
3070
#
3093
#
3071
# Returns         : Undefined
3094
# Returns         : Undefined
3072
#
3095
#
3073
sub BuildAccessPerms
3096
sub BuildAccessPerms
3074
{
3097
{
-
 
3098
    Warning("BuildAccessPerms directive does nothing and should be removed") unless $Clobber;
3075
}
3099
}
3076
 
3100
 
3077
 
3101
 
3078
sub BuildSetenv
3102
sub BuildSetenv
3079
{
3103
{
-
 
3104
    Warning("BuildSetenv directive does nothing and should be removed") unless $Clobber;
3080
    push( @BUILDSETENV, @_ );
3105
    push( @BUILDSETENV, @_ );
3081
}
3106
}
3082
 
3107
 
3083
#-------------------------------------------------------------------------------
3108
#-------------------------------------------------------------------------------
3084
# Function        : DataDirective
3109
# Function        : DataDirective
Line 4791... Line 4816...
4791
    -help -help    - Display verbose usage
4816
    -help -help    - Display verbose usage
4792
    -man           - Display internal manual
4817
    -man           - Display internal manual
4793
    -verbose[=n]   - Set level of progress verbosity
4818
    -verbose[=n]   - Set level of progress verbosity
4794
    -debug[=n]     - Set the debug level
4819
    -debug[=n]     - Set the debug level
4795
    -cache         - Cache packages in the local dpkg_package cache
4820
    -cache         - Cache packages in the local dpkg_package cache
-
 
4821
    -localcache    - Cache packages into the interface directory
4796
    -cache -cache  - Forced refresh dependent packages in the local cache
4822
    -cache -cache  - Forced refresh dependent packages in the local cache
4797
    -package       - Ignore packages that are not available and continue
4823
    -package       - Ignore packages that are not available and continue
4798
    -nopackages    - Ignore package processing directives
4824
    -nopackages    - Ignore package processing directives
4799
    -forcebuildpkg - Treat LinkPkgArchive directives as BuildPkgArchive
4825
    -forcebuildpkg - Treat LinkPkgArchive directives as BuildPkgArchive
4800
                     Also suppress the use of symlinks so that the physical
4826
                     Also suppress the use of symlinks so that the physical
Line 4844... Line 4870...
4844
If an argument is provided, then it will be used to set the level, otherwise the
4870
If an argument is provided, then it will be used to set the level, otherwise the
4845
existing level will be incremented. This option may be specified multiple times.
4871
existing level will be incremented. This option may be specified multiple times.
4846
 
4872
 
4847
=item B<-cache>
4873
=item B<-cache>
4848
 
4874
 
4849
This option will cause dependent packages to be cached in the local
4875
This option will cause dependent packages to be cached in the users local
-
 
4876
dpkg_archive cache as defined via GBE_DPKG_CACHE
-
 
4877
 
-
 
4878
If the option is used twice then the packages will be forcibly refreshed.
-
 
4879
 
4850
dpkg_archive cache.
4880
=item B<-localcache>
-
 
4881
 
-
 
4882
This option will cause dependent packages to be cached into the interface 
-
 
4883
directory. This option simplifies the use of a cache when building single
-
 
4884
packages.
4851
 
4885
 
4852
If the option is used twice then the packages will be forcibly refreshed.
4886
If the option is used twice then the packages will be forcibly refreshed.
4853
 
4887
 
4854
=item B<-package>
4888
=item B<-package>
4855
 
4889