Merge Release.pm fix from 3.16 into 3.17
This commit is contained in:
@@ -43,16 +43,16 @@ sub readReleaseFiles {
|
||||
# Parse a configure/RELEASE* file and anything it includes
|
||||
#
|
||||
sub readRelease {
|
||||
my ($file, $Rmacros, $Rapps, $Rdone) = @_;
|
||||
# $Rmacros and $Rdone are hash-refs, $Rapps an array-ref
|
||||
my ($file, $Rmacros, $Rapps, $Ractive) = @_;
|
||||
# $Rmacros and $Ractive are hash-refs, $Rapps an array-ref
|
||||
|
||||
if (exists $Rdone->{$file}) {
|
||||
if ($Ractive->{$file} > 0) {
|
||||
die "Release.pm: Recursive loop found in RELEASE files,\n" .
|
||||
"discovered in $file\n";
|
||||
}
|
||||
|
||||
open(my $IN, '<', $file) or croak "Can't open $file: $!\n";
|
||||
$Rdone->{$file}++;
|
||||
$Ractive->{$file}++;
|
||||
while (<$IN>) {
|
||||
chomp;
|
||||
s/ \r $//x; # Shouldn't need this, but sometimes...
|
||||
@@ -77,11 +77,12 @@ sub readRelease {
|
||||
my ($op, $path) = m/^ \s* (-? include) \s+ (.*)/x;
|
||||
$path = expandMacros($path, $Rmacros);
|
||||
if (-e $path) {
|
||||
&readRelease($path, $Rmacros, $Rapps, $Rdone);
|
||||
&readRelease($path, $Rmacros, $Rapps, $Ractive);
|
||||
} elsif ($op eq "include") {
|
||||
carp "EPICS/Release.pm: Include file '$path' not found\n";
|
||||
}
|
||||
}
|
||||
$Ractive->{$file}--;
|
||||
close $IN;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user