summaryrefslogtreecommitdiff
path: root/modules/ProjectCreator.pm
diff options
context:
space:
mode:
authorChad Elliott <elliott_c@ociweb.com>2016-03-07 13:43:21 -0600
committerChad Elliott <elliott_c@ociweb.com>2016-03-07 13:43:21 -0600
commit4422c0c0e55ee01033c1b9f45df5bbc385f4fffb (patch)
treec69e56baf8ac5bd9c0fc342a5681d04b3beaae8b /modules/ProjectCreator.pm
parent5fb44a674b91c340fe347516790070bbbbf75f5a (diff)
downloadMPC-4422c0c0e55ee01033c1b9f45df5bbc385f4fffb.tar.gz
Mon Mar 7 19:40:37 UTC 2016 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/ProjectCreator.pm')
-rw-r--r--modules/ProjectCreator.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index b4012203..f65da899 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -921,7 +921,7 @@ sub parse_line {
## information.
foreach my $key (keys %{$self->{'valid_components'}}) {
delete $self->{$key};
- $self->{'defaulted'}->{$key} = 0;
+ delete $self->{'defaulted'}->{$key};
}
if (defined $self->{'addtemp_state'}) {
$self->restore_state($self->{'addtemp_state'}, 'addtemp');
@@ -1533,11 +1533,22 @@ sub parse_components {
## The default components name was never used
## so we remove it from the components
delete $$comps{$current};
+
+ ## For custom_only projects, an empty section is functionally
+ ## equivalent to not defining it at all.
+ $self->{'defaulted'}->{$tag} = 1
+ if (!defined $self->{'defaulted'}->{$tag} &&
+ $self->get_assignment('custom_only'));
}
else {
## It was used, so we need to add that name to
## the set of group names unless it's already been added.
$self->process_assignment_add($grtag, $current);
+
+ ## Define the defaulted section value so that if a following
+ ## empty section of the same type is found, it will not cause the
+ ## defaulted value to be overwritten.
+ $self->{'defaulted'}->{$tag} = 0;
}
if ($set) {
$current = $defgroup;