Subversion Repositories DevTools

Rev

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

Rev 5710 Rev 5820
Line 46... Line 46...
46
#
46
#
47
#   Globals
47
#   Globals
48
#
48
#
49
my %component =  ();
49
my %component =  ();
50
my %component_use =  ();
50
my %component_use =  ();
51
my $not_use_count = 0;
-
 
52
my $suffix_count = 0;
51
my $suffix_count = 0;
53
my @pkg_errors;
52
my @pkg_errors;
54
my @pkg_errors_val;
53
my @pkg_errors_val;
55
my $max_pkglen = 10;
54
my $max_pkglen = 10;
56
 
55
 
Line 153... Line 152...
153
    $report->( @pkg_errors );
152
    $report->( @pkg_errors );
154
    $report->( @pkg_errors_val );
153
    $report->( @pkg_errors_val );
155
    $report->( "Package Names and Versions in build files may not match Release Manager");
154
    $report->( "Package Names and Versions in build files may not match Release Manager");
156
}
155
}
157
 
156
 
158
ReportError("Unused packages found: $not_use_count")
-
 
159
    if ( $opt_errors && $not_use_count && $opt_datafile);
-
 
160
 
-
 
161
 
-
 
162
ErrorDoExit();
157
ErrorDoExit();
163
exit 0;
158
exit 0;
164
 
159
 
165
#-------------------------------------------------------------------------------
160
#-------------------------------------------------------------------------------
166
# Function        : read_config_file
161
# Function        : read_config_file
Line 650... Line 645...
650
 
645
 
651
#-------------------------------------------------------------------------------
646
#-------------------------------------------------------------------------------
652
# Function        : display_unused
647
# Function        : display_unused
653
#
648
#
654
# Description     : Generate warnings about config items that were not used
649
# Description     : Generate warnings about config items that were not used
-
 
650
#                   If we are in 'error' mode , then simply push the messages
-
 
651
#                   onto the error list
655
#
652
#
656
# Inputs          :
653
# Inputs          :
657
#
654
#
658
# Returns         :
655
# Returns         :
659
#
656
#
Line 665... Line 662...
665
    foreach my $comp ( sort keys %component_use )
662
    foreach my $comp ( sort keys %component_use )
666
    {
663
    {
667
        foreach my $suf ( keys %{$component_use{$comp}} )
664
        foreach my $suf ( keys %{$component_use{$comp}} )
668
        {
665
        {
669
            my $ver = get_version( $comp, $suf );
666
            my $ver = get_version( $comp, $suf );
670
            Warning("Unused package: ${comp}_${ver}");
667
            my $msg = "Unused package: '${comp}_${ver}'";
671
            $not_use_count++;
668
            if ($opt_errors)
-
 
669
            {
-
 
670
                push @pkg_errors, $msg;
-
 
671
            }
-
 
672
            else
-
 
673
            {
-
 
674
                Warning("Unused package: ${comp}_${ver}");
-
 
675
            }
672
        }
676
        }
673
    }
677
    }
674
}
678
}
675
 
679
 
676
#-------------------------------------------------------------------------------
680
#-------------------------------------------------------------------------------