diff options
author | Frerich Raabe <raabe@froglogic.com> | 2015-12-21 13:23:13 +0100 |
---|---|---|
committer | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-01-12 12:57:06 +0000 |
commit | ba9ddaed740e3a6c1aa68018d316423974ef7258 (patch) | |
tree | 98c98f527198fa259678eeadc6bc059140e468f2 /tools/binarycreator/binarycreator.cpp | |
parent | 181e6870fbf44416b36efa7c054fad1014dc935d (diff) |
Fix timeout errors while building app bundles files on OS X
...by simply not using any timeout anymore. I believe this was the
original intention of the code (it's arguably hideous that the default
value of the waitForFinished() method is a 30000ms timeout).
What happened for me is that the mkdmg.sh script took longer than 30
seconds. As a consequence
1. the 'waitForFinished()' call returned
2. The mkdgm.sh script was deleted
3. The QProcess object went out of scope, terminating the shell process
4. The binarycreator process terminated successfully
The resulting .dmg file seemed plausible (it was fairly large already)
but it wasn't usable yet since the hdiutil process started by mkdmg.sh
was still running, i.e. the .dmg file was still growing. Hence, the
caller of binarycreator (e.g. some CI system) continued processing a
malformed .dmg file (and the temporary file created by mkdmg.sh never
got deleted).
Last but not least, proper error handling would have been nice of course
but I considered that to be out of scope for this particular commit.
Change-Id: I767ff89d20802306189660804cea617c148a943e
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
Diffstat (limited to 'tools/binarycreator/binarycreator.cpp')
-rw-r--r-- | tools/binarycreator/binarycreator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp index 4564b5188..27098117a 100644 --- a/tools/binarycreator/binarycreator.cpp +++ b/tools/binarycreator/binarycreator.cpp @@ -234,7 +234,7 @@ static int assemble(Input input, const QInstaller::Settings &settings) chmod755(copyscript); QProcess p; p.start(copyscript, QStringList() << bundle); - p.waitForFinished(); + p.waitForFinished(-1); QFile::rename(input.outputPath, tempFile); QFile::remove(copyscript); } @@ -320,7 +320,7 @@ static int assemble(Input input, const QInstaller::Settings &settings) QProcess p; p.start(mkdmgscript, QStringList() << QFileInfo(input.outputPath).fileName() << bundle); - p.waitForFinished(); + p.waitForFinished(-1); QFile::remove(mkdmgscript); qDebug() << "done." << mkdmgscript; } |