diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-10-04 14:44:02 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-10-04 14:44:02 +0000 |
commit | c0abe35bfab2782d69a087bb0b82eef9a1ff2a00 (patch) | |
tree | aaf10dc5280ca9cefc6b19dd20f18c0e5beaaf32 | |
parent | 2dda16f071cd7e2c8b8ab863fca709a219e8116c (diff) |
Remove self-dependency from list of thorns passed to cyclic dependency checker.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4167 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/sbin/ConfigurationParser.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sbin/ConfigurationParser.pl b/lib/sbin/ConfigurationParser.pl index 60cf64a9..420b9ccf 100644 --- a/lib/sbin/ConfigurationParser.pl +++ b/lib/sbin/ConfigurationParser.pl @@ -24,7 +24,7 @@ sub CreateConfigurationDatabase { my($config_dir, %thorns) = @_; my(%cfg) = (); - my($thorn, $required, @missing, @foundlist, $founderrlist, $filename, %thorncap, $foundcap, $temp,$cap,$message,$hint); + my($thorn, $required, @missing, @foundlist, $founderrlist, $filename, %thorncap, $foundcap, $temp,$cap,$message,$hint, %thorn_dependencies); # Loop through each thorn's configuration file. foreach $thorn (sort keys %thorns) @@ -115,7 +115,8 @@ sub CreateConfigurationDatabase # create a hash with thorn-> used thorns (no prefix) foreach $thorn (sort keys %thorns) { - $thorn_dependencies{uc($thorn)}=$cfg{"\U$thorn\E USES THORNS"}; + $thorn_dependencies{uc($thorn)}=$cfg{"\U$thorn\E USES THORNS"}; + $thorn_dependencies{uc($thorn)} =~ s/\b$thorn\b//i; } $message = &find_dep_cycles(%thorn_dependencies); @@ -209,9 +210,7 @@ sub ParseConfigurationCCL } elsif($line =~ m/^\s*REQUIRES\s*(.*)/i) { - my $temp = $1; - $temp =~ s/\b$thorn\b//i; - $cfg->{"\U$thorn\E REQUIRES"} .= "$temp "; + $cfg->{"\U$thorn\E REQUIRES"} .= "$1 "; } elsif($line =~ m/^\s*OPTIONAL\s*/i) { |