diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-09-15 11:43:21 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-09-15 11:43:21 +0000 |
commit | ee6ad76a9438af889c58f9636455b23f1d20bf19 (patch) | |
tree | a1f7c1a8446cb9abda0687476b48afa021d25f38 | |
parent | 1e242498402a4fc5a48951592fbcc08753468933 (diff) | |
download | MPC-ee6ad76a9438af889c58f9636455b23f1d20bf19.tar.gz |
ChangeLogTag: Mon Sep 15 06:42:28 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | modules/WorkspaceCreator.pm | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index c7d5dde7..dc1af5c1 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -1303,34 +1303,38 @@ sub get_validated_ordering { my($project) = shift; my($warn) = shift; my($pjs) = $self->get_project_info(); - - my($name, $deps) = @{$$pjs{$project}}; - if (defined $deps && $deps ne '') { - my($darr) = $self->create_array($deps); - my($projects) = $self->get_projects(); - foreach my $dep (@$darr) { - my($found) = 0; - ## Avoid circular dependencies - if ($dep ne $name && $dep ne basename($project)) { - foreach my $p (@$projects) { - if ($dep eq $$pjs{$p}->[0] || $dep eq basename($p)) { - $found = 1; - last; + my($name) = undef; + my($deps) = ''; + + if (defined $$pjs{$project}) { + ($name, $deps) = @{$$pjs{$project}}; + if (defined $deps && $deps ne '') { + my($darr) = $self->create_array($deps); + my($projects) = $self->get_projects(); + foreach my $dep (@$darr) { + my($found) = 0; + ## Avoid circular dependencies + if ($dep ne $name && $dep ne basename($project)) { + foreach my $p (@$projects) { + if ($dep eq $$pjs{$p}->[0] || $dep eq basename($p)) { + $found = 1; + last; + } } - } - if (!$found) { - if ($warn && defined $ENV{MPC_VERBOSE_ORDERING}) { - print "WARNING: '$name' references '$dep' which has " . - "not been processed\n"; + if (!$found) { + if ($warn && defined $ENV{MPC_VERBOSE_ORDERING}) { + print "WARNING: '$name' references '$dep' which has " . + "not been processed\n"; + } + $deps =~ s/\s*"$dep"\s*/ /g; } - $deps =~ s/\s*"$dep"\s*/ /g; } } } - } - $deps =~ s/^\s+//; - $deps =~ s/\s+$//; + $deps =~ s/^\s+//; + $deps =~ s/\s+$//; + } return $deps; } |