Subversion Repositories DevTools

Rev

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

Rev 2321 Rev 2354
Line 266... Line 266...
266
 
266
 
267
 
267
 
268
#
268
#
269
#   Map packages into Repos
269
#   Map packages into Repos
270
#
270
#
-
 
271
my %Repos_lowercase;
271
my %Repos;
272
my %Repos;
272
my %RepoSubIndex;
273
my %RepoSubIndex;
273
Message ("Mapping Vobs to Repo");
274
Message ("Mapping Vobs to Repo");
274
foreach my $pkgid ( keys %PackageSet )
275
foreach my $pkgid ( keys %PackageSet )
275
{
276
{
276
    my $repo = mapPackage($pkgid);
277
    my $repo = mapPackage($pkgid);
277
    Error ("Unmapped package: $PackageData{$pkgid}{name}" ) unless ( $repo );
278
    Error ("Unmapped package: $PackageData{$pkgid}{name}" ) unless ( $repo );
-
 
279
    my $repo_lc = lc $repo;
278
 
280
 
-
 
281
    if (exists $Repos_lowercase{$repo_lc} && $Repos_lowercase{$repo_lc} ne $repo )
-
 
282
    {
-
 
283
        Error ("Package mapping: Mapped to Repo with same name, but different case",
-
 
284
               "Package: $PackageData{$pkgid}{name}",
-
 
285
               "Mapped repo   : $repo",
-
 
286
               "Already mapped: $Repos_lowercase{$repo_lc}");
-
 
287
    }
-
 
288
 
-
 
289
    $Repos_lowercase{$repo_lc} = $repo;
279
    $PackageData{$pkgid}{mappedRepo} = $repo;
290
    $PackageData{$pkgid}{mappedRepo} = $repo;
280
    push @{$Repos{$repo}}, $pkgid;
291
    push @{$Repos{$repo}}, $pkgid;
-
 
292
 
-
 
293
    if ( $repo eq 'SVN' )
-
 
294
    {
-
 
295
        my %RepoList;
-
 
296
        foreach my $pvid ( @{$PackageSet{$pkgid}} )
-
 
297
        {
-
 
298
            my $repo = $ScmPackages{$pvid}{'vcstag'};
-
 
299
            if ( $repo =~ m~SVN::AUPERASVN01/(.*)/(.*?)(/tags/|/branches/|/trunk)~i )
-
 
300
            {
-
 
301
                my $repo = $1;
-
 
302
                unless( exists $RepoList{$repo} )
-
 
303
                {
-
 
304
                    $RepoList{$repo} = 1 ;
-
 
305
                    $PackageData{$pkgid}{mappedRepo} = $repo;
-
 
306
                    push @{$Repos{$repo}}, $pkgid;
-
 
307
                }
-
 
308
            }
-
 
309
        }
-
 
310
 
-
 
311
    }
281
}
312
}
282
 
313
 
283
foreach ( keys %Repos )
314
foreach ( keys %Repos )
284
{
315
{
285
    @{$Repos{$_}} = sort{ uc($PackageData{$a}{name}) cmp uc($PackageData{$b}{name}) } @{$Repos{$_}};
316
    @{$Repos{$_}} = sort{ uc($PackageData{$a}{name}) cmp uc($PackageData{$b}{name}) } @{$Repos{$_}};
Line 294... Line 325...
294
    @{$Repos{$base}} = () unless ( exists $Repos{$base} );
325
    @{$Repos{$base}} = () unless ( exists $Repos{$base} );
295
}
326
}
296
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
327
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
297
#DebugDumpData("Repos", \%Repos);
328
#DebugDumpData("Repos", \%Repos);
298
 
329
 
299
 
-
 
300
#
330
#
301
#   Create a list of Packages
331
#   Create a list of Packages
302
#
332
#
-
 
333
my $totalPackageCount = 0;
303
{
334
{
304
    my $file = "PackageNames.txt";
335
    my $file = "PackageNames.txt";
305
    my $count = 0;
-
 
306
    Message("Create Package Name List", $file);
336
    Message("Create Package Name List", $file);
307
    open ( my $fh, '>', $file ) || Error ("Cannot open $file", "Error: $!");
337
    open ( my $fh, '>', $file ) || Error ("Cannot open $file", "Error: $!");
308
 
338
 
309
    foreach ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
339
    foreach ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
310
    {
340
    {
311
        print $fh "$PackageData{$_}{name}\n";
341
        print $fh "$PackageData{$_}{name}\n";
312
        $count++;
342
        $totalPackageCount++;
313
 
343
 
314
    }
344
    }
315
    close $fh;
345
    close $fh;
316
    Message("Unique Package Names: $count");
346
    Message("Unique Package Names: $totalPackageCount");
317
#    DebugDumpData("PackageData", \%PackageData);
347
#    DebugDumpData("PackageData", \%PackageData);
318
}
348
}
319
 
349
 
320
#
350
#
321
#   Determine Releases that have multiple versions of a package
351
#   Determine Releases that have multiple versions of a package
Line 401... Line 431...
401
 
431
 
402
        foreach my $pkgid ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
432
        foreach my $pkgid ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
403
        {
433
        {
404
            my $repo = $PackageData{$pkgid}{mappedRepo};
434
            my $repo = $PackageData{$pkgid}{mappedRepo};
405
            my $name = $PackageData{$pkgid}{name};
435
            my $name = $PackageData{$pkgid}{name};
-
 
436
            my $svn = $PackageData{$pkgid}{isSVN} ? 'SVN' : '---';
-
 
437
 
-
 
438
            my $youngest = $PackageData{$pkgid}{youngAge};
-
 
439
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
-
 
440
            my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
-
 
441
 
-
 
442
            $youngest =  int($youngest);
-
 
443
            $youngestNonRipple =  int($youngestNonRipple) || '9999';
-
 
444
            $youngestNonBuildadm = int($youngestNonBuildadm) || '9999';
-
 
445
 
-
 
446
            my $txt = sprintf ("Last:%5d, User:%5d, NonR:%5d, $svn", $youngest, $youngestNonBuildadm, $youngestNonRipple);
-
 
447
           $txt .= sprintf (" :: %40s -repo=%s", $name, $repo );
406
            $fh->WriteLn("'$name' '-repo=$repo'");
448
            $fh->WriteLn($txt);
407
        }
449
        }
408
        $fh->Close();
450
        $fh->Close();
409
    }
451
    }
410
 
452
 
411
    my $file = "cc2svn.repo.dat";
453
    my $file = "cc2svn.repo.dat";
Line 434... Line 476...
434
 
476
 
435
    Error ("Bad HTML section id: $section") unless ( exists $htmlData{$section} );
477
    Error ("Bad HTML section id: $section") unless ( exists $htmlData{$section} );
436
    $currentSection = $section;
478
    $currentSection = $section;
437
    my $fname = $htmlData{$section}{file};
479
    my $fname = $htmlData{$section}{file};
438
    my $title = $htmlData{$section}{title};
480
    my $title = $htmlData{$section}{title};
-
 
481
    Message("Generating: $title");
439
 
482
 
440
    open ($handle, '>', $fname) || Error ("Cannot create HTML: $fname");
483
    open ($handle, '>', $fname) || Error ("Cannot create HTML: $fname");
441
    print $handle <<"HEADER";
484
    print $handle <<"HEADER";
442
<!DOCTYPE $handle PUBLIC "-//W3C//DTD $handle 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
485
<!DOCTYPE $handle PUBLIC "-//W3C//DTD $handle 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
443
<html>
486
<html>
Line 834... Line 877...
834
    print $HTML $t->getTable;
877
    print $HTML $t->getTable;
835
    generateHTMLTail($HTML);
878
    generateHTMLTail($HTML);
836
    #
879
    #
837
    #   Bad Package information
880
    #   Bad Package information
838
    #
881
    #
839
Message("Bad Package Versions");
-
 
840
    my %BadByProject;
882
    my %BadByProject;
841
    my $last_proj_id = 0;
883
    my $last_proj_id = 0;
842
 
884
 
843
    $HTML = generateHTMLHeader ('S5');
885
    $HTML = generateHTMLHeader ('S5');
844
    print $HTML "These package-versions cannot be reproduced from ClearCase. This may be due to\n";
886
    print $HTML "These package-versions cannot be reproduced from ClearCase. This may be due to\n";
Line 877... Line 919...
877
    generateHTMLTail($HTML);
919
    generateHTMLTail($HTML);
878
 
920
 
879
    #
921
    #
880
    #   Bad package vesrions by project
922
    #   Bad package vesrions by project
881
    #
923
    #
882
Message("Bad Package Versions by Project");
-
 
883
    $HTML = generateHTMLHeader ('S6');
924
    $HTML = generateHTMLHeader ('S6');
884
    $t = new HTML::Table( -border=>1 );
925
    $t = new HTML::Table( -border=>1 );
885
    $t->addRow( 'Release','Package');
926
    $t->addRow( 'Release','Package');
886
    $t->setRowHead(1,1);
927
    $t->setRowHead(1,1);
887
    $last_proj_id = 0;
928
    $last_proj_id = 0;
Line 933... Line 974...
933
    generateHTMLTail($HTML);
974
    generateHTMLTail($HTML);
934
 
975
 
935
    #
976
    #
936
    #   Releases that have multiple instances of the same package in them
977
    #   Releases that have multiple instances of the same package in them
937
    #
978
    #
938
Message("Multiple Packages");
-
 
939
    $HTML = generateHTMLHeader ('S7');
979
    $HTML = generateHTMLHeader ('S7');
940
    print $HTML "Releases that have multiple instances of the same package\n";
980
    print $HTML "Releases that have multiple instances of the same package\n";
941
#DebugDumpData("ReleasePackages", \%ReleasePackages );
981
#DebugDumpData("ReleasePackages", \%ReleasePackages );
942
 
982
 
943
    $t = new HTML::Table( -border=>1 );
983
    $t = new HTML::Table( -border=>1 );
Line 982... Line 1022...
982
    $t->setColHead(1,1);
1022
    $t->setColHead(1,1);
983
    print $HTML $t->getTable;
1023
    print $HTML $t->getTable;
984
    generateHTMLTail($HTML);
1024
    generateHTMLTail($HTML);
985
    
1025
    
986
 
1026
 
987
Message("Repo Index");
-
 
988
    $HTML = generateHTMLHeader ('S8');
1027
    $HTML = generateHTMLHeader ('S8');
989
    print $HTML "A summary of proposed Repostories and Paths\n";
1028
    print $HTML "A summary of proposed Repostories and Paths\n";
990
 
1029
 
991
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
1030
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
992
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
1031
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
Line 1025... Line 1064...
1025
#DebugDumpData("Repos", \%Repos);
1064
#DebugDumpData("Repos", \%Repos);
1026
    
1065
    
1027
    #
1066
    #
1028
    #   Repo back reference
1067
    #   Repo back reference
1029
    #
1068
    #
1030
Message("Repo Map");
-
 
1031
    $HTML = generateHTMLHeader ('S9');
1069
    $HTML = generateHTMLHeader ('S9');
1032
    print $HTML "Proposed Repostories and Paths with package mapping and ClearCase Path\n";
1070
    print $HTML "Proposed and Converted Repostories and Paths with package mapping and ClearCase Path\n";
1033
 
1071
 
1034
    $t = new HTML::Table( -border=>1 );
1072
    $t = new HTML::Table( -border=>1 );
1035
    $t->addRow( 'Repository Path', 'Package Name,Original Vob Path(s),Last Build NonBuildadm [ANY]]' );
1073
    $t->addRow( 'Repository Path', 'Package Name,Original Vob Path(s),Last Build NonBuildadm [ANY]' );
1036
 
1074
 
1037
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
1075
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
1038
    {
1076
    {
1039
        next if ( $repo eq 'SVN' );
1077
        next if ( $repo eq 'SVN' );
1040
        next if ( $repo eq 'UNKNOWN' );
1078
        next if ( $repo eq 'UNKNOWN' );
Line 1044... Line 1082...
1044
        foreach my $pkgid ( @{$Repos{$repo}} )
1082
        foreach my $pkgid ( @{$Repos{$repo}} )
1045
        {
1083
        {
1046
            my $t2 = new HTML::Table( -border=>0,-padding=>0, -spacing=>0, -class=>'paddedTable' );
1084
            my $t2 = new HTML::Table( -border=>0,-padding=>0, -spacing=>0, -class=>'paddedTable' );
1047
            foreach my $vob ( keys %{$PackageData{$pkgid}{vobPath}} )
1085
            foreach my $vob ( keys %{$PackageData{$pkgid}{vobPath}} )
1048
            {
1086
            {
-
 
1087
                    if ($PackageData{$pkgid}{isSVN} && $vob !~ m~^/~ )
-
 
1088
                    {
-
 
1089
                        $vob = svnLink($vob);
-
 
1090
                        #$vob = "<span style=\"background-color:#B1FB17\">$vob</span>";
-
 
1091
                    }
1049
                    $t2->addRow( $vob );
1092
                    $t2->addRow( $vob );
1050
            }
1093
            }
-
 
1094
            my $t2Text = '';
1051
            if ( $t2->getTableRows() )
1095
            if ( $t2->getTableRows() )
1052
            {
1096
            {
1053
                $t2->setColClass (1, 'listTitle' );
1097
                $t2->setColClass (1, 'listTitle' );
-
 
1098
                $t2Text = $t2->getTable();
1054
            }
1099
            }
1055
            my $youngest = $PackageData{$pkgid}{youngAge};
1100
            my $youngest = $PackageData{$pkgid}{youngAge};
1056
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
1101
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
1057
            my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
1102
            my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
1058
 
1103
 
1059
            $youngest =  int($youngest);
1104
            $youngest =  int($youngest);
1060
            $youngestNonRipple =  int($youngestNonRipple) || '-';
1105
            $youngestNonRipple =  int($youngestNonRipple) || '-';
1061
            $youngestNonBuildadm = int($youngestNonBuildadm) || '-';
1106
            $youngestNonBuildadm = int($youngestNonBuildadm) || '-';
1062
            
1107
            
1063
            $t1->addRow( linkPackageDetails($pkgid),
-
 
1064
                         $t2->getTable(), "$youngestNonBuildadm [$youngest]"  );
1108
            $t1->addRow( linkPackageDetails($pkgid), $t2Text, "$youngestNonBuildadm [$youngest]"  );
1065
        }
1109
        }
1066
 
1110
 
1067
        if ( $t1->getTableRows() )
1111
        if ( $t1->getTableRows() )
1068
        {
1112
        {
1069
            $t1->setColWidth(1,'30%');
1113
            $t1->setColWidth(1,'30%');
Line 1079... Line 1123...
1079
    generateHTMLTail($HTML);
1123
    generateHTMLTail($HTML);
1080
    
1124
    
1081
    #
1125
    #
1082
    #   Highlight packages that have not been mapped to a Repo
1126
    #   Highlight packages that have not been mapped to a Repo
1083
    #
1127
    #
1084
Message("Not Mapped");
-
 
1085
    $HTML = generateHTMLHeader ('SA');
1128
    $HTML = generateHTMLHeader ('SA');
1086
    print $HTML "Packages that have not been mapped to a Repository\n";
1129
    print $HTML "Packages that have not been mapped to a Repository\n";
1087
    $t = new HTML::Table( -border=>1 );
1130
    $t = new HTML::Table( -border=>1 );
1088
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
1131
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
1089
    {
1132
    {
Line 1113... Line 1156...
1113
    generateHTMLTail($HTML);
1156
    generateHTMLTail($HTML);
1114
 
1157
 
1115
    #
1158
    #
1116
    #   Packages already under Subversion
1159
    #   Packages already under Subversion
1117
    #
1160
    #
1118
Message("In Subversion");
-
 
1119
    $HTML = generateHTMLHeader ('SB');
1161
    $HTML = generateHTMLHeader ('SB');
1120
    print $HTML "Packages that are currently in Subversion\n";
1162
    print $HTML "Packages that are currently in Subversion\n";
1121
    print $HTML "<br>Packages in Subversion: ". scalar @{$Repos{SVN}} ."\n";
1163
    print $HTML "<br>Packages in Subversion   : ". scalar @{$Repos{SVN}} ."\n";
-
 
1164
    print $HTML "<br>Total Packages to convert: ". $totalPackageCount ."\n";
1122
    print $HTML anchor("SVN",'SVN');
1165
    print $HTML "<p>" ,anchor("SVN",'SVN');
1123
 
1166
 
1124
    $t = new HTML::Table( -border=>1 );
1167
    $t = new HTML::Table( -border=>1 );
1125
    foreach my $pkgid ( @{$Repos{SVN}} )
1168
    foreach my $pkgid ( @{$Repos{SVN}} )
1126
    {
1169
    {
1127
        my %RepoList;
1170
        my %RepoList;
Line 1425... Line 1468...
1425
 
1468
 
1426
        'AtmelHAL'                              => 'MASS_Dev_Crypto',
1469
        'AtmelHAL'                              => 'MASS_Dev_Crypto',
1427
        'Netbula'                               => 'COTS',
1470
        'Netbula'                               => 'COTS',
1428
        'ObjectiveGrid'                         => 'COTS',
1471
        'ObjectiveGrid'                         => 'COTS',
1429
        'lmos'                                  => 'DPG_SWBase',
1472
        'lmos'                                  => 'DPG_SWBase',
-
 
1473
#        'daf_cd_transap'                        => 'DPG_SWBase',
1430
        'basetypes'                             => 'MASS_Dev_Infra',
1474
        'basetypes'                             => 'MASS_Dev_Infra',
1431
        'accesscontrol_ejb-api'                 => 'MASS_Dev_Infra/security',
1475
        'accesscontrol_ejb-api'                 => 'MASS_Dev_Infra/security',
1432
        'tp5000_MUG'                            => 'MREF_Package',
1476
        'tp5000_MUG'                            => 'MREF_Package',
1433
        'udman'                                 => 'MASS_Dev_Infra',
1477
        'udman'                                 => 'MASS_Dev_Infra',
1434
        'emvud'                                 => 'DPG_SWBase/emvud',
1478
        'emvud'                                 => 'DPG_SWBase/emvud',
Line 1439... Line 1483...
1439
 
1483
 
1440
        'jboss_config'                          => 'MASS_Dev_Bus/Business' ,
1484
        'jboss_config'                          => 'MASS_Dev_Bus/Business' ,
1441
        'jboss_service'                         => 'MASS_Dev_Bus/Business' ,
1485
        'jboss_service'                         => 'MASS_Dev_Bus/Business' ,
1442
        'pgres'                                 => 'ITSO_TRACS/DataManagement' ,
1486
        'pgres'                                 => 'ITSO_TRACS/DataManagement' ,
1443
        'ERGcda_imports'                        => 'MREF_Package',
1487
        'ERGcda_imports'                        => 'MREF_Package',
-
 
1488
        'daf_dataman_extras'                    => 'ProjectCD/seattle',
-
 
1489
        'XmlDocInterface'                       => 'MASS_Dev_Infra',
-
 
1490
 
-
 
1491
        # Kill single package subdirs
-
 
1492
        'application'                           => 'MASS_Dev_Bus',
-
 
1493
        'card'                                  => 'MASS_Dev_Bus',
-
 
1494
        'cardholder'                            => 'MASS_Dev_Bus',
-
 
1495
        'opman-database'                        => 'MASS_Dev_Bus',
-
 
1496
        'product'                               => 'MASS_Dev_Bus',
-
 
1497
        'VmtInterface'                          => 'MASS_Dev_Bus',
-
 
1498
        'systemcd_ejb-api'                      => 'MASS_Dev_Bus/CBP',
-
 
1499
        'boi'                                   => 'MASS_Dev_Bus/BOI',
1444
 
1500
 
1445
    );
1501
    );
1446
 
1502
 
1447
    my %VobRename = (
1503
    my %VobRename = (
1448
        'LMOS'              => 'LinuxDevices',
1504
        'LMOS'              => 'LinuxDevices',
Line 1455... Line 1511...
1455
        'GMPTE2005'             => 'ITSO_TRACS',
1511
        'GMPTE2005'             => 'ITSO_TRACS',
1456
        'GMPTE2005_obe'         => 'ITSO_TRACS',
1512
        'GMPTE2005_obe'         => 'ITSO_TRACS',
1457
        'UK_ITSO_COMPLIANT'     => 'ITSO_TRACS',
1513
        'UK_ITSO_COMPLIANT'     => 'ITSO_TRACS',
1458
    );
1514
    );
1459
 
1515
 
-
 
1516
    my %PreferredPath = (
-
 
1517
        'MASS_Dev_Bus/Reports'      => 1,
-
 
1518
        'MASS_Dev_Bus/CBP'          => 1,
-
 
1519
        'MASS_Dev_Bus/Business'     => 1,
-
 
1520
        'MASS_Dev_Bus/CIPP'        => 1,
-
 
1521
    );
-
 
1522
 
1460
    # default is 1
1523
    # default is 1
1461
    my %VobDepth = (
1524
    my %VobDepth = (
1462
        'DPG_SWBase'                => 2,
1525
        'DPG_SWBase'                => 2,
1463
        'ITSO_TRACS'                => 2,
1526
        'ITSO_TRACS'                => 2,
1464
        'ITSO_TRACS/Packages'       => 1,
1527
        'ITSO_TRACS/Packages'       => 1,
Line 1490... Line 1553...
1490
    #
1553
    #
1491
    #   Some path cleanup
1554
    #   Some path cleanup
1492
    #
1555
    #
1493
    if ( $path )
1556
    if ( $path )
1494
    {
1557
    {
-
 
1558
        $path =~ s~\s+~~i;
1495
        $path =~ s~/build.pl$~~i;
1559
        $path =~ s~/build.pl$~~i;
1496
        $path =~ s~/src$~~i;
1560
        $path =~ s~/src$~~i;
1497
        $path =~ s~DPC_SWCode/~DPG_SWCode/~i;
1561
        $path =~ s~DPC_SWCode/~DPG_SWCode/~i;
1498
        $path =~ s~MASS_Dev/Bus/~MASS_Dev_Bus/~i;
1562
        $path =~ s~MASS_Dev/Bus/~MASS_Dev_Bus/~i;
1499
        $path =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
1563
        $path =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
-
 
1564
        $path =~ s~MASS_Dev_Bus/WebServices~MASS_Dev_Bus/WebServices~i;
1500
        $path =~ s~/Vastraffik/~/Vasttrafik/~;
1565
        $path =~ s~/Vastraffik/~/Vasttrafik/~;
1501
        $path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
1566
        $path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
1502
    }
1567
    }
1503
    
1568
    
1504
    #
1569
    #
Line 1607... Line 1672...
1607
 
1672
 
1608
    return "UNKNOWN"
1673
    return "UNKNOWN"
1609
        unless ( $vob );
1674
        unless ( $vob );
1610
 
1675
 
1611
    #
1676
    #
-
 
1677
    #   Can we map the package into a preferred path
-
 
1678
    #
-
 
1679
    foreach my $ppath ( sort keys %PreferredPath )
-
 
1680
    {
-
 
1681
        if ( $path =~ m~${ppath}(/|$)~ )
-
 
1682
        {
-
 
1683
#print "---- Preferred path: $name, $ppath\n";
-
 
1684
            return $ppath;
-
 
1685
        }
-
 
1686
    }
-
 
1687
 
-
 
1688
    #
1612
    #   Determine depth for this path
1689
    #   Determine depth for this path
1613
    #
1690
    #
1614
    my $depth = 1;
1691
    my $depth = 1;
1615
    foreach ( reverse sort keys %VobDepth)
1692
    foreach ( reverse sort keys %VobDepth)
1616
    {
1693
    {
Line 1618... Line 1695...
1618
        {
1695
        {
1619
            $depth = $VobDepth{$_};
1696
            $depth = $VobDepth{$_};
1620
            last;
1697
            last;
1621
        }
1698
        }
1622
    }
1699
    }
-
 
1700
 
1623
#print "--Joining: $name, $depth, @pathBase\n";
1701
#print "--Joining: $name, $depth, @pathBase\n";
1624
    return pathJoin($depth, $path, $name, @pathBase);
1702
    return pathJoin($depth, $path, $name, @pathBase);
1625
}
1703
}
1626
 
1704
 
1627
sub pathJoin
1705
sub pathJoin
Line 1890... Line 1968...
1890
{
1968
{
1891
    my ($tag) = @_;
1969
    my ($tag) = @_;
1892
    $tag =~ tr~\\/~/~;
1970
    $tag =~ tr~\\/~/~;
1893
    if ( $tag =~ m~^CC::~ )
1971
    if ( $tag =~ m~^CC::~ )
1894
    {
1972
    {
1895
        $tag =~ s~CC::\s+~CC::~;
1973
        $tag =~ s~CC::load\s+~CC::~;                # Load rule
-
 
1974
        $tag =~ s~CC::\s+~CC::~;                    # Leading white space
-
 
1975
        $tag =~ s~CC::[A-Za-z]\:/~CC::/~;           # Leading driver letter
-
 
1976
        $tag =~ s~CC::/+~CC::/~;                    # Multiple initial /'s
1896
        $tag =~ s~/build.pl::~::~i;
1977
        $tag =~ s~/build.pl::~::~i;
1897
        $tag =~ s~/src::~::~i;
1978
        $tag =~ s~/src::~::~i;
1898
        $tag =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
1979
        $tag =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
1899
        $tag =~ s~MASS_Dev_Bus~MASS_Dev_Bus~i;
1980
        $tag =~ s~MASS_Dev_Bus~MASS_Dev_Bus~i;
1900
        $tag =~ s~/MASS_Dev/Infra~MASS_Dev_Infra~i;
1981
        $tag =~ s~/MASS_Dev/Infra~MASS_Dev_Infra~i;