...
|
...
|
@@ -230,11 +230,15 @@ class PackageUtils(object):
|
230
|
230
|
|
231
|
231
|
def adjustGCCSpecs(self, package, chrootID, logPath):
|
232
|
232
|
opt = " " + constants.specData.getSecurityHardeningOption(package)
|
233
|
|
- shutil.copy2(self.adjustGCCSpecScript, chrootID+"/tmp/"+self.adjustGCCSpecScript)
|
234
|
233
|
cmdUtils=CommandUtils()
|
|
234
|
+ cpcmd="cp "+ self.adjustGCCSpecScript+" "+chrootID+"/tmp/"+self.adjustGCCSpecScript
|
235
|
235
|
cmd = "/tmp/"+self.adjustGCCSpecScript+opt
|
236
|
236
|
logFile = logPath+"/adjustGCCSpecScript.log"
|
237
|
237
|
chrootCmd=self.runInChrootCommand+" "+chrootID
|
|
238
|
+ returnVal = cmdUtils.runCommandInShell(cpcmd, logFile)
|
|
239
|
+ if not returnVal:
|
|
240
|
+ self.logger.error("Error during copying the file adjust gcc spec")
|
|
241
|
+ raise "Failed while copying adjust gcc spec file"
|
238
|
242
|
returnVal = cmdUtils.runCommandInShell(cmd, logFile, chrootCmd)
|
239
|
243
|
if returnVal:
|
240
|
244
|
return
|