From bd056ea4700a4ac4be32df1f4035068acb87ed03 Mon Sep 17 00:00:00 2001
From: James Beacham <j.beacham@cern.ch>
Date: Fri, 15 Jun 2018 17:36:46 +0000
Subject: [PATCH] Merge branch '21.0-fix-for-Archive_tf' into '21.0'

This branch fixes a bug in Archive_tf

See merge request atlas/athena!12104

(cherry picked from commit cb1a0482e72171f68ed6974bfb811193ef1d28ad [formerly 72300cd8c6499c46d4196a7bcc64c1b64699fe5d])

305abfc5 This branch fixes a bug in Archive_tf

Former-commit-id: 148634c276376196d80c7430c91dcec7f0e98fb3
---
 Tools/PyJobTransforms/python/trfExe.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 83ac6e4c734..ce18a98a6fd 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -1816,8 +1816,7 @@ class bsMergeExecutor(scriptExecutor):
                 raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'), 
                                                                 'Exception raised when renaming {0} to {1}: {2}'.format(self._outputFilename, self.conf.dataDictionary[self._outputBS].value[0], e))
         super(bsMergeExecutor, self).postExecute()
-        
-                
+
 
 class tagMergeExecutor(scriptExecutor):
     
@@ -1878,7 +1877,6 @@ class archiveExecutor(scriptExecutor):
 
         if self._exe == 'tar':
             self._cmd = [self._exe, '-c', '-v',]
-            self._cmd.extend(['-f', self.conf.argdict['outputArchFile'].value[0]])
             if 'compressionType' in self.conf.argdict:
                 if self.conf.argdict['compressionType'] == 'gzip':
                     self._cmd.append('-z')
@@ -1886,6 +1884,8 @@ class archiveExecutor(scriptExecutor):
                     self._cmd.append('-j')
                 elif self.conf.argdict['compressionType'] == 'none':
                     pass
+            self._cmd.extend(['-f', self.conf.argdict['outputArchFile'].value[0]])
+            self._cmd.extend(self.conf.argdict['inputDataFile'].value)
         elif self._exe == 'zip':
             self._cmd = ['python']
             try:
@@ -1905,5 +1905,5 @@ class archiveExecutor(scriptExecutor):
                 raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_EXEC_SETUP_WRAPPER'),
                     errMsg
                 )
-        self._cmd.append('zip_wrapper.py')
+            self._cmd.append('zip_wrapper.py')
         super(archiveExecutor, self).preExecute(input=input, output=output)
-- 
GitLab