Skip to content

Commit

Permalink
Adding hack to retry adjustGCCspecs in case of failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dthaluru committed Jun 11, 2015
1 parent 1433099 commit 87c89d0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion support/package-builder/PackageBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,16 @@ def adjustGCCSpecs(self, package, chrootID, logPath):
cmd = "/tmp/"+self.adjustGCCSpecScript+opt
logFile = logPath+"/adjustGCCSpecScript.log"
chrootCmd=self.runInChrootCommand+" "+chrootID
returnVal = cmdUtils.runCommandInShell(cmd, logFile, chrootCmd)
retryCount=10
returnVal=False
while retryCount > 0:
returnVal = cmdUtils.runCommandInShell(cmd, logFile, chrootCmd)
if returnVal:
return
self.logger.error("Failed while adjusting gcc specs")
self.logger.error("Retrying again .....")
retryCount = retryCount - 1
sleep(5)
if not returnVal:
self.logger.error("Failed while adjusting gcc specs")
raise "Failed while adjusting gcc specs"

0 comments on commit 87c89d0

Please sign in to comment.