Subversion Repositories DevTools

Rev

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

Rev 7310 Rev 7312
Line 2309... Line 2309...
2309
    my ($fe, $args) = @_;
2309
    my ($fe, $args) = @_;
2310
    my $txt = '';
2310
    my $txt = '';
2311
    my $statusB = ' ';
2311
    my $statusB = ' ';
2312
    my $statusF = ' ';
2312
    my $statusF = ' ';
2313
    my $statusS = ' ';
2313
    my $statusS = ' ';
-
 
2314
    my $statusP = ' ';
2314
 
2315
 
2315
    unless ($fe->{buildActive}) {
2316
    unless ($fe->{buildActive}) {
2316
        $txt .= ($fe->{buildSkip}) ? ' (Build Skipped)' : ' (Build Suppressed)';
2317
        $txt .= ($fe->{buildSkip}) ? ' (Build Skipped)' : ' (Build Suppressed)';
2317
        $statusS = ($fe->{buildSkip}) ? 'S' : 's';
2318
        $statusS = ($fe->{buildSkip}) ? 'S' : 's';
2318
    }
2319
    }
Line 2322... Line 2323...
2322
        $statusB = '*';
2323
        $statusB = '*';
2323
        $txt .= ' (Current Package)';
2324
        $txt .= ' (Current Package)';
2324
    }
2325
    }
2325
 
2326
 
2326
    my $sigFile = getPkgFingerPrintFile($fe);
2327
    my $sigFile = getPkgFingerPrintFile($fe);
2327
    my $tagFile = $sigFile;
-
 
2328
    if (-f $sigFile)
2328
    if (-f $sigFile)
2329
    {
2329
    {
-
 
2330
        my $nobFile = $sigFile;
2330
        $sigFile =~ s~ffp$~nob~;
2331
        $nobFile =~ s~ffp$~nob~;
2331
        if (-f $sigFile) {
2332
        if (-f $nobFile) {
2332
            $txt .= ' [NoBuild]';
2333
            $txt .= ' [NoBuild]';
2333
            $statusB = '-';
2334
            $statusB = '-';
2334
        } elsif (locatePreBuiltPackage($fe)) {
-
 
2335
            $txt .= ' [PreBuilt]';
-
 
2336
            $statusB = 'P';
-
 
2337
        } else {
2335
        } else {
2338
            $txt .= ' [Built]';
2336
            $txt .= ' [Built]';
2339
            $statusB = 'B';
2337
            $statusB = 'B';
2340
        }
2338
        }
2341
 
2339
 
2342
        if ($args->{testFingerPrint})
2340
        if ($args->{testFingerPrint})
2343
        {
2341
        {
2344
            if ( TagFileMatch($tagFile, genPkgFingerPrint($fe, 'Test')) )
2342
            if ( TagFileMatch($sigFile, genPkgFingerPrint($fe, 'Test')) )
2345
            {
2343
            {
2346
                $txt .= ' [GoodFinger]';
2344
                $txt .= ' [GoodFinger]';
2347
                $statusF = 'G';
2345
                $statusF = 'G';
2348
            } else {
2346
            } else {
2349
                $txt .= ' [BadFinger]';
2347
                $txt .= ' [BadFinger]';
2350
                $statusF = 'b';
2348
                $statusF = 'b';
2351
            }
2349
            }
2352
        }
2350
        }
2353
 
-
 
2354
    }
2351
    }
-
 
2352
 
-
 
2353
    my $preBuilt = locatePreBuiltPackage($fe);
-
 
2354
    if ($preBuilt) {
-
 
2355
        $txt .= ' [PreBuilt]';
-
 
2356
        $statusP = 'P';
-
 
2357
    } 
-
 
2358
 
2355
    return "$statusS$statusB$statusF", $txt ;
2359
    return "$statusS$statusB$statusP$statusF", $txt ;
2356
 
2360
 
2357
}
2361
}
2358
 
2362
 
2359
#-------------------------------------------------------------------------------
2363
#-------------------------------------------------------------------------------
2360
# Function        : opts_add2List
2364
# Function        : opts_add2List
Line 2394... Line 2398...
2394
#                   faster as there is no file i/o.
2398
#                   faster as there is no file i/o.
2395
#                   
2399
#                   
2396
#                   It does assume that the file metadata will change if the file is changed
2400
#                   It does assume that the file metadata will change if the file is changed
2397
#                   Will also detect the addition / deletion of files
2401
#                   Will also detect the addition / deletion of files
2398
#                   
2402
#                   
2399
#                   Note: This siganture is not machine - type safe
2403
#                   Note: This signature is not machine - type safe
2400
#                         It will vary between machines (windows/Linux/...)
2404
#                         It will vary between machines (windows/Linux/...)
-
 
2405
#                         At the moment the Sandbox is really a single machine tool
2401
#
2406
#
2402
# Inputs          : $fe            - Package entry of the package to process
2407
# Inputs          : $fe            - Package entry of the package to process
2403
#                   $mode          - Diagnostic: mode
2408
#                   $mode          - Diagnostic: mode
2404
#
2409
#
2405
# Returns         : A SHA1 hash over all the files
2410
# Returns         : A SHA1 hash over all the files
Line 2431... Line 2436...
2431
    #
2436
    #
2432
    my @dirList = ToolsetFiles::GetSubTrees($ifaceDir);
2437
    my @dirList = ToolsetFiles::GetSubTrees($ifaceDir);
2433
    Error ("Internal:ToolsetFiles::GetDirList for $fe->{dname} not populated" ) unless @dirList;
2438
    Error ("Internal:ToolsetFiles::GetDirList for $fe->{dname} not populated" ) unless @dirList;
2434
 
2439
 
2435
    #
2440
    #
-
 
2441
    #   Generate a hash of toolset files and toolset-internal directories
-
 
2442
    #       These won't be included in the finger print as they are subject
-
 
2443
    #       to change by a 'build'.
-
 
2444
    #
-
 
2445
    my %toolsetFiles = map { $_ => 1 } ToolsetFiles::GetFiles($ifaceDir, 1);
-
 
2446
    my %toolsetDirs  = map { $_ => 1 } ToolsetFiles::GetBuildDirs($ifaceDir);
-
 
2447
 
-
 
2448
    #
2436
    #   Create the hash
2449
    #   Create the hash
2437
    #
2450
    #
2438
    $genPkgFingerPrintSha1 = Digest->new("SHA-1");
2451
    $genPkgFingerPrintSha1 = Digest->new("SHA-1");
2439
    push @fpdata, $mode;
2452
    push @fpdata, $mode;
2440
 
2453
 
Line 2467... Line 2480...
2467
        #       Kill of the last access time - not useful
2480
        #       Kill of the last access time - not useful
2468
        #       
2481
        #       
2469
        #       Need to exclude files that change during a null build
2482
        #       Need to exclude files that change during a null build
2470
        #           /interface/GbeFiles.cfg
2483
        #           /interface/GbeFiles.cfg
2471
        #           /build.log
2484
        #           /build.log
-
 
2485
        #           These files are tracked in GbeBuild.cfg
-
 
2486
        #       Need to directories that change during a null build
-
 
2487
        #           These files are tracked in GbeBuild.cfg
2472
        #           
2488
        #           
2473
        #       Symlinks present problems.
2489
        #       Symlinks present problems.
2474
        #       Some packages generate symlinks as they create file system images. The
2490
        #       Some packages generate symlinks as they create file system images. The
2475
        #       links are not designed to be interpreted in the context of the current
2491
        #       links are not designed to be interpreted in the context of the current
2476
        #       computer. As a result.
2492
        #       computer. As a result.
Line 2486... Line 2502...
2486
        #       
2502
        #       
2487
        #       Current solution: Do not include 'stat' data for ANY symlink or directory
2503
        #       Current solution: Do not include 'stat' data for ANY symlink or directory
2488
        #
2504
        #
2489
        my @data = stat($item);
2505
        my @data = stat($item);
2490
        my $text;
2506
        my $text;
-
 
2507
 
2491
        if ( $item =~ m~/build.log$~ || $item =~ m~/GbeFiles.cfg$~) {
2508
        if ( exists $toolsetFiles{$item}) {
2492
            $text = "$item : SKIPPED FILE : ";
2509
            $text = "$item : SKIPPED FILE : ";
2493
 
2510
 
2494
        }  elsif (-d $item ) {
2511
        }  elsif (-d $item ) {
2495
                $text = "$item : DIRECTORY"
2512
            $text = "$item : DIRECTORY";
-
 
2513
            if ( exists $toolsetDirs{$item}) {
-
 
2514
                $File::Find::prune = 1;
-
 
2515
                $text = "$item : SKIP INTERNAL DIRECTORY";
-
 
2516
            }
-
 
2517
 
2496
        }  elsif (-l $item ) {
2518
        }  elsif (-l $item ) {
2497
            if ( ! @data) {
2519
            if ( ! @data) {
2498
                $text = "$item : BROKEN SYMLINK : ";
2520
                $text = "$item : BROKEN SYMLINK : ";
2499
            } else {
2521
            } else {
2500
                my $linkTarget = readlink($item) || 'Read Error';
2522
                my $linkTarget = readlink($item) || 'Read Error';
Line 2524... Line 2546...
2524
    #
2546
    #
2525
    #   Debugging - delete later
2547
    #   Debugging - delete later
2526
    #   Save FP data to a file
2548
    #   Save FP data to a file
2527
    #
2549
    #
2528
    my $fpDebugFile = catdir($GBE_SANDBOX, 'sandbox_dpkg_archive', $fe->{name} . '.' . $fe->{prj} . '_' . time() . '.fpd');
2550
    my $fpDebugFile = catdir($GBE_SANDBOX, 'sandbox_dpkg_archive', $fe->{name} . '.' . $fe->{prj} . '_' . time() . '.fpd');
2529
Debug0("fpDebugFile: $fpDebugFile");
2551
#Debug0("fpDebugFile: $fpDebugFile");
2530
    FileCreate($fpDebugFile, @fpdata);
2552
    FileCreate($fpDebugFile, @fpdata);
2531
 
2553
 
2532
    return $genPkgFingerPrintSha1->hexdigest;
2554
    return $genPkgFingerPrintSha1->hexdigest;
2533
}
2555
}
2534
 
2556