141 |
|
my $scramprojects = $::scram->_loadscramdb(); |
142 |
|
|
143 |
|
# Look for a match in the scram db: |
144 |
< |
foreach my $S (@$selected) |
145 |
< |
{ |
146 |
< |
if (exists ($scramprojects->{$S})) |
147 |
< |
{ |
148 |
< |
# Now check the version required exists in |
149 |
< |
# list of scram projects with this name: |
150 |
< |
while (my ($pdata,$plocation) = each %{$scramprojects->{$S}}) |
151 |
< |
{ |
152 |
< |
# Split the $pdata string to get the real name and the version: |
153 |
< |
my ($pname,$pversion) = split(":",$pdata); |
154 |
< |
if ($pversion eq $self->defaultversion($S)) |
155 |
< |
{ |
156 |
< |
# Get the tool manager for the scram project: |
157 |
< |
my $sa=$::scram->scramfunctions()->scramprojectdb()->getarea($pname,$pversion); |
158 |
< |
# Load the tool cache: |
159 |
< |
if ( -r $sa->toolcachename()) |
160 |
< |
{ |
161 |
< |
use Cache::CacheUtilities; |
162 |
< |
my $satoolmanager=&Cache::CacheUtilities::read($sa->toolcachename()); |
163 |
< |
# Copy needed content from toolmanager for scram-managed project only |
164 |
< |
# if the projects have compatible configurations (compare first set of |
165 |
< |
# digits): |
166 |
< |
if ($self->check_compatibility($satoolmanager)) |
167 |
< |
{ |
168 |
< |
$self->inheritcontent($satoolmanager); |
169 |
< |
} |
170 |
< |
} |
144 |
> |
foreach my $S (@$selected) { |
145 |
> |
if (exists ($scramprojects->{$S})) { |
146 |
> |
# Check for environment SCRAM_INHERIT_COMPAT_CONFIG: |
147 |
> |
if (exists($ENV{SCRAM_INHERIT_COMPAT_CONFIG})) { |
148 |
> |
# Now check the version required exists in |
149 |
> |
# list of scram projects with this name: |
150 |
> |
while (my ($pdata,$plocation) = each %{$scramprojects->{$S}}) { |
151 |
> |
# Split the $pdata string to get the real name and the version: |
152 |
> |
my ($pname,$pversion) = split(":",$pdata); |
153 |
> |
if ($pversion eq $self->defaultversion($S)) { |
154 |
> |
# Get the tool manager for the scram project: |
155 |
> |
my $sa=$::scram->scramfunctions()->scramprojectdb()->getarea($pname,$pversion); |
156 |
> |
# Load the tool cache: |
157 |
> |
if ( -r $sa->toolcachename()) { |
158 |
> |
use Cache::CacheUtilities; |
159 |
> |
my $satoolmanager=&Cache::CacheUtilities::read($sa->toolcachename()); |
160 |
> |
# Copy needed content from toolmanager for scram-managed project only |
161 |
> |
# if the projects have compatible configurations (compare first set of |
162 |
> |
# digits): |
163 |
> |
if ($self->check_compatibility($satoolmanager)) { |
164 |
> |
$self->inheritcontent($satoolmanager); |
165 |
> |
} |
166 |
> |
} |
167 |
> |
} |
168 |
|
} |
169 |
< |
} |
170 |
< |
# Also add this scram-managed project to list of tools to set up: |
171 |
< |
push(@localtools,$S); |
172 |
< |
} |
173 |
< |
else |
174 |
< |
{ |
175 |
< |
# Store other tools in ReqDoc in separate array. We will set up these tools later: |
176 |
< |
push(@localtools,$S); |
180 |
< |
} |
181 |
< |
} |
169 |
> |
} |
170 |
> |
# Also add this scram-managed project to list of tools to set up: |
171 |
> |
push(@localtools,$S); |
172 |
> |
} else { |
173 |
> |
# Store other tools in ReqDoc in separate array. We will set up these tools later: |
174 |
> |
push(@localtools,$S); |
175 |
> |
} |
176 |
> |
} |
177 |
|
|
178 |
|
# Set up extra tools required in this project, in addition to |
179 |
|
# any scram-managed projects |