diff options
| author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-21 00:03:09 +0100 | 
|---|---|---|
| committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-21 00:03:09 +0100 | 
| commit | c11a903d57465b5bd51f1a2bc885d27aca0b28cc (patch) | |
| tree | f264661a4f225e3aba208b115f51175c686027eb | |
| parent | f137810abb336cd8cfda5087419fb4b99c12e5fe (diff) | |
| download | sbotools2-c11a903d57465b5bd51f1a2bc885d27aca0b28cc.tar.xz | |
Handle check_distfiles() return values properly
This fixes #21.
| -rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 3a4aeb1..2cb0b4d 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -1295,14 +1295,15 @@ sub process_sbos {  	my $locs = $args{LOCATIONS};  	my $jobs = $args{JOBS} =~ /^\d+$/ ? $args{JOBS} : 0;  	exists $$todo[0] or script_error('process_sbos requires TODO.'); -	my (@failures, @symlinks, $temp_syms, $exit); +	my (@failures, @symlinks, $err);  	FIRST: for my $sbo (@$todo) {  		my $compat32 = $sbo =~ /-compat32$/ ? 1 : 0; -		($temp_syms, $exit) = check_distfiles( +		my ($temp_syms, $exit) = check_distfiles(  			LOCATION => $$locs{$sbo}, COMPAT32 => $compat32  		);  		# if $exit is defined, prompt to proceed or return with last $exit  		if ($exit) { +			$err = $exit;  			my $fail = $temp_syms;  			push @failures, {$sbo => $fail};  			# return now if we're not interactive @@ -1316,6 +1317,8 @@ sub process_sbos {  				unlink for @symlinks;  				return \@failures, $exit;  			} +		} else { +			push @symlinks, @$temp_syms;  		}  	}  	my $count = 0 unless $args{NON_INT}; @@ -1383,7 +1386,7 @@ sub process_sbos {  		}  	}  	unlink for @symlinks; -	return \@failures, $exit; +	return \@failures, $err;  }  # subroutine to print out failures | 
