From d14b1b34bafc7cc82383e8032f3adb626747849b Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Tue, 1 Mar 2022 17:54:22 +0200 Subject: Add support for parallel extraction of component archives Introduce ConcurrentOperationRunner class used for running installer operations concurrently in the global thread pool. Add execution groups for operations; Unpack operations are run concurrently for all components requesting installation, operations belonging to Install group are run sequentially for sorted components one at a time as before. From the default registered operations the Extract op is moved to Unpack group. Move the previously on-the-fly backup steps of Extract operation to the ExtractArchiveOperation::backup(), so that backups are done before any archives are extracted, and that we know if any of the archives requires administrator privileges to unpack. Reparent QInstaller::Error to QException to support throwing and catching exceptions across thread boundaries. Use RAII for the server-side objects of the classes supporting the remote client-server protocol of installer framework. The concurrent extraction revealed that it was still possible that the local socket was disconnected and thus the RemoteServer- Connection thread finished before receiving and processing the final "Destroy" command packet, leaking the dynamically allocated objects. Task-number: QTIFW-2566 Change-Id: Ib8c2928b9405b7b3465c731018df73acb51e949f Reviewed-by: Leena Miettinen Reviewed-by: Katja Marttila --- tools/archivegen/archivegen.pro | 2 +- tools/binarycreator/binarycreator.pro | 2 +- tools/devtool/devtool.pro | 2 +- tools/repogen/repogen.pro | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/archivegen/archivegen.pro b/tools/archivegen/archivegen.pro index fef39ae6f..7440f0843 100644 --- a/tools/archivegen/archivegen.pro +++ b/tools/archivegen/archivegen.pro @@ -5,7 +5,7 @@ INCLUDEPATH += . .. include(../../installerfw.pri) QT -= gui -QT += qml xml +QT += qml xml concurrent CONFIG -= import_plugins CONFIG(lzmasdk) { diff --git a/tools/binarycreator/binarycreator.pro b/tools/binarycreator/binarycreator.pro index df83cc0d5..1266b91c6 100644 --- a/tools/binarycreator/binarycreator.pro +++ b/tools/binarycreator/binarycreator.pro @@ -5,7 +5,7 @@ INCLUDEPATH += . .. include(../../installerfw.pri) QT -= gui -QT += qml xml +QT += qml xml concurrent CONFIG -= import_plugins diff --git a/tools/devtool/devtool.pro b/tools/devtool/devtool.pro index 71d2d2b87..def7066af 100644 --- a/tools/devtool/devtool.pro +++ b/tools/devtool/devtool.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = devtool -QT = core network qml xml +QT = core network qml xml concurrent include(../../installerfw.pri) diff --git a/tools/repogen/repogen.pro b/tools/repogen/repogen.pro index c8ef74e8b..73f1eafe5 100644 --- a/tools/repogen/repogen.pro +++ b/tools/repogen/repogen.pro @@ -5,7 +5,7 @@ INCLUDEPATH += . .. include(../../installerfw.pri) QT -= gui -QT += qml xml +QT += qml xml concurrent CONFIG -= import_plugins -- cgit v1.2.3