diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2009-11-02 13:36:25 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2009-11-02 13:36:25 +0000 |
commit | 3608702350dba2f38082705486865c769460554f (patch) | |
tree | c7f6a602c2a63a578bc08d65729740e466b50e17 | |
parent | 40d032cee163671b4e314a33c32ac93d318e83f1 (diff) | |
download | MPC-3608702350dba2f38082705486865c769460554f.tar.gz |
ChangeLogTag: Mon Nov 2 13:35:00 UTC 2009 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | modules/WorkspaceCreator.pm | 39 |
2 files changed, 29 insertions, 17 deletions
@@ -1,3 +1,10 @@ +Mon Nov 2 13:35:00 UTC 2009 Chad Elliott <elliott_c@ociweb.com> + + * modules/WorkspaceCreator.pm: + + Fixed a bug where an MPC file used in more than one aggregated + workspace wouldn't be ignored. + Thu Oct 29 22:55:05 UTC 2009 Chad Elliott <elliott_c@ociweb.com> * docs/README: diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index 38045ff0..d11c81ef 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -301,6 +301,11 @@ sub aggregated_workspace { $self->{$self->{'type_check'}} = 0; $self->{'scoped_basedir'} = $self->mpc_dirname($file); + ## If the directory name for the file is the current directory, we + ## need to empty it out. If we don't, it will cause the file name to + ## not match up with itself later on where scoped_basedir is used. + $self->{'scoped_basedir'} = undef if ($self->{'scoped_basedir'} eq '.'); + while(<$fh>) { my $line = $self->preprocess_line($fh, $_); ($status, $error, @values) = $self->parse_known($line); @@ -625,25 +630,25 @@ sub handle_scoped_unknown { if ($self->path_is_relative($line)) { $line = $self->{'scoped_basedir'} . ($line ne '.' ? "/$line" : ''); } - - ## We must build up the list of project files and use them as the - ## keys in the duplicate hash check. We need to call - ## search_for_files() because the user may have just listed - ## directories in the workspace and we need to deal with mpc files. - my @files; - $self->search_for_files($self->{'project_files'}, \@files); - my %dup; - @dup{@files} = (); - $dupchk = \%dup; - - ## If the aggregated workspace contains a scope (other than exclude) - ## it will be processed in the block above and we will eventually get - ## here, but by that time $type will no longer be $aggregated. So, - ## we just need to set it here to ensure that we don't add everything - ## in the scoped_basedir directory in handle_scoped_end() - $self->{'handled_scopes'}->{$aggregated} = 1; } + ## We must build up the list of project files and use them as the + ## keys in the duplicate hash check. We need to call + ## search_for_files() because the user may have just listed + ## directories in the workspace and we need to deal with mpc files. + my @files; + $self->search_for_files($self->{'project_files'}, \@files); + my %dup; + @dup{@files} = (); + $dupchk = \%dup; + + ## If the aggregated workspace contains a scope (other than exclude) + ## it will be processed in the block above and we will eventually get + ## here, but by that time $type will no longer be $aggregated. So, + ## we just need to set it here to ensure that we don't add everything + ## in the scoped_basedir directory in handle_scoped_end() + $self->{'handled_scopes'}->{$aggregated} = 1; + if (-d $line) { my @files; $self->search_for_files([ $line ], \@files, $$flags{'implicit'}); |