From: Jacob Bachmeyer Date: Fri, 21 Oct 2022 03:51:25 +0000 (-0500) Subject: Add operation list to execute_commands call X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a4fdfcba0a5b7bf9ad0bfe27fbeb04bdf592099e;p=gatekeeper.git Add operation list to execute_commands call This also adds a simple consistency check in execute_commands. --- diff --git a/gatekeeper.pl b/gatekeeper.pl index ab9a30a..b4dbcf5 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1924,6 +1924,7 @@ sub install_files { # they were specified in, thanks to the 'order' value in the %info # hash sub execute_commands { + my $oplist = shift; my $files = shift; my %info = @_; @@ -1938,6 +1939,10 @@ sub execute_commands { delete($info{version}); delete($info{'replace'}); + ftp_abort("invalid internal operation list") + unless $oplist->[0][0] eq 'header'; + my $header = $oplist->[0][1]; + my $destdir = "$destfinal/$originfo{directory}"; foreach my $key (sort { $info{$a}{order} <=> $info{$b}{order} } keys %info) { if ($key eq 'filename') { @@ -2083,7 +2088,8 @@ foreach my $packet (@packets) { # each list element is an array reference if ($oplist) { # do the work - execute_commands({directive => $directive_file, upload => $upload_file, + execute_commands($oplist, + {directive => $directive_file, upload => $upload_file, sig => $sig_file, directive_only => $directive_only}, %info);