Subversion Repositories DevTools

Rev

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

Rev 331 Rev 335
Line 65... Line 65...
65
my $HOME         = $ENV{'HOME'};
65
my $HOME         = $ENV{'HOME'};
66
my $GBE_SANDBOX  = $ENV{'GBE_SANDBOX'};
66
my $GBE_SANDBOX  = $ENV{'GBE_SANDBOX'};
67
my $GBE_DPKG_SBOX= $ENV{'GBE_DPKG_SBOX'};
67
my $GBE_DPKG_SBOX= $ENV{'GBE_DPKG_SBOX'};
68
my $GBE_MACHTYPE = $ENV{'GBE_MACHTYPE'};
68
my $GBE_MACHTYPE = $ENV{'GBE_MACHTYPE'};
69
 
69
 
-
 
70
my $GBE_DPKG_LOCAL = $ENV{'GBE_DPKG_LOCAL'};
-
 
71
my $GBE_DPKG_CACHE = $ENV{'GBE_DPKG_CACHE'};
-
 
72
my $GBE_DPKG       = $ENV{'GBE_DPKG'};
-
 
73
my $GBE_DPLY       = $ENV{'GBE_DPLY'};
-
 
74
my $GBE_DPKG_STORE = $ENV{'GBE_DPKG_STORE'};
-
 
75
 
70
#
76
#
71
#   Globals
77
#   Globals
72
#
78
#
73
my @build_order = ();                     # Build Ordered list of entries
79
my @build_order = ();                     # Build Ordered list of entries
74
my %extern_deps;                          # Hash of external dependencies
80
my %extern_deps;                          # Hash of external dependencies
Line 197... Line 203...
197
#
203
#
198
# Returns         : Will exit
204
# Returns         : Will exit
199
#
205
#
200
sub info
206
sub info
201
{
207
{
202
    Error ("Unexpected arguments: @ARGV") if ( @ARGV );
-
 
203
    #
208
    #
204
    #   Allow user to specify verboseness as an argument
209
    #   Allow user to specify verboseness as an argument
205
    #
210
    #
-
 
211
    my @unknown;
206
    foreach  ( @_ )
212
    foreach  ( @_ )
207
    {
213
    {
208
        $opt_verbose++ if ( m/^-v/ )
214
        $opt_verbose++, next if ( m/^-v/ );
-
 
215
        push @unknown, $_;
209
    }
216
    }
-
 
217
    Error ("sandbox info: Unknown options: @unknown") if @unknown;
210
 
218
 
211
    #
219
    #
212
    #   Determine Sandbox information
220
    #   Determine Sandbox information
213
    #   Populate global variables
221
    #   Populate global variables
214
    #
222
    #
Line 247... Line 255...
247
    Message("External Dependencies");
255
    Message("External Dependencies");
248
    foreach my $de ( sort keys %extern_deps )
256
    foreach my $de ( sort keys %extern_deps )
249
    {
257
    {
250
        my ($pn,$ps) = split( $; , $de);
258
        my ($pn,$ps) = split( $; , $de);
251
        my @vlist = keys %{$extern_deps{$de}};
259
        my @vlist = keys %{$extern_deps{$de}};
252
        my $flag = $#vlist ? '*' : ' ';
260
        my $flag = $#vlist ? '+' : '';
253
        foreach my $pv ( @vlist )
261
        foreach my $pv ( @vlist )
254
        {
262
        {
-
 
263
            my $exists = check_package_existance( $pn, "$pv.$ps") ? '' : '*';
-
 
264
            my $flags = sprintf ("%4.4s", $flag . $exists);
255
            Message ("   $flag$pn $pv.$ps");
265
            Message ("${flags}${pn} ${pv}.${ps}");
256
            if ( $opt_verbose )
266
            if ( $opt_verbose )
257
            {
267
            {
258
                foreach my $pkg ( @{$extern_deps{$de}{$pv}} )
268
                foreach my $pkg ( @{$extern_deps{$de}{$pv}} )
259
                {
269
                {
260
                    my ($ppn,$pps) = split( $; , $pkg);
270
                    my ($ppn,$pps) = split( $; , $pkg);
Line 273... Line 283...
273
    }
283
    }
274
    exit (0);
284
    exit (0);
275
}
285
}
276
 
286
 
277
#-------------------------------------------------------------------------------
287
#-------------------------------------------------------------------------------
-
 
288
# Function        : check_package_existance
-
 
289
#
-
 
290
# Description     : Determine if a given package-version exists
-
 
291
#
-
 
292
# Inputs          : $name           - Package Name
-
 
293
#                   $ver            - Package Version
-
 
294
#
-
 
295
# Returns         : true            - Package exists
-
 
296
#
-
 
297
sub check_package_existance
-
 
298
{
-
 
299
    my ($name, $ver) = @_;
-
 
300
    #
-
 
301
    #   Look in each package archive directory
-
 
302
    #
-
 
303
    foreach my $dpkg ( $GBE_DPKG_SBOX,
-
 
304
                       $GBE_DPKG_LOCAL,
-
 
305
                       $GBE_DPKG_CACHE,
-
 
306
                       $GBE_DPKG,
-
 
307
                       $GBE_DPLY,
-
 
308
                       $GBE_DPKG_STORE )
-
 
309
    {
-
 
310
        next unless ( $dpkg );
-
 
311
        if ( -d "$dpkg/$name/$ver" )
-
 
312
        {
-
 
313
            return 1;
-
 
314
        }
-
 
315
    }
-
 
316
   return 0;
-
 
317
}
-
 
318
 
-
 
319
 
-
 
320
#-------------------------------------------------------------------------------
278
# Function        : calc_sandbox_info
321
# Function        : calc_sandbox_info
279
#
322
#
280
# Description     : Examine the sandbox and determine all the important
323
# Description     : Examine the sandbox and determine all the important
281
#                   information
324
#                   information
282
#
325
#
Line 686... Line 729...
686
=over 8
729
=over 8
687
 
730
 
688
=item * No Verbosity
731
=item * No Verbosity
689
 
732
 
690
The basic command will display the build order and the external
733
The basic command will display the build order and the external
-
 
734
dependencies. External dependencies may be prefixed with one of the
691
dependencies
735
following indicators:
-
 
736
 
-
 
737
=over 8
-
 
738
 
-
 
739
=item   +   Multiple versions of this package are being used by sandboxed components.
-
 
740
 
-
 
741
=item   *   The package cannot be found in any of the package archives.
-
 
742
 
-
 
743
=back
692
 
744
 
693
=item Verbosity of 1
745
=item Verbosity of 1
694
 
746
 
695
This level of verbosoity will display the build order and detailed information
747
This level of verbosoity will display the build order and detailed information
696
on the dependencies. The dependencies will be prefixed with:
748
on the dependencies. The dependencies will be prefixed with:
Line 701... Line 753...
701
 
753
 
702
=item   I   Dependent Package is internal to the sandbox
754
=item   I   Dependent Package is internal to the sandbox
703
 
755
 
704
=back
756
=back
705
 
757
 
706
This level of verbosity display information on packages that are external to the
-
 
707
sandbox. External dependencies may be prefixed with a '*'. This indicates that
758
External dependencies may be prefixed with one of the indicators described for
708
multiple versions of this package are being used by sandboxed components.
-
 
709
 
-
 
710
The internal consumer of the external package is also shown. These are
759
no-verbosity. Additionally the internal consumer of the external package is also
711
prefixed with a 'U'.
760
shown. These are prefixed with a 'U'.
712
 
761
 
713
=item Verbosity of 2
762
=item Verbosity of 2
714
 
763
 
715
Reserved forfuture use
764
Reserved forfuture use
716
 
765