summaryrefslogtreecommitdiffstats
path: root/src/sdk/installerbase.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2019-05-27 14:02:36 +0300
committerKatja Marttila <katja.marttila@qt.io>2019-11-22 12:55:39 +0000
commitf8ade64515482e2079fde805b93ee11e3dae44f5 (patch)
treeeb487a2c41b341777c8a92b828ef5d212fad0a5b /src/sdk/installerbase.cpp
parente238e764331197ec48e9b8b6c29368ee40efe82c (diff)
Update selected components from command line
Selected components can be updated with --updatePackages <package_id>. If essential components are found, only the essential components are updated. Change-Id: I0eb8a8f5ca855af16eabd5f888cd9a0d5e933d84 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/sdk/installerbase.cpp')
-rw-r--r--src/sdk/installerbase.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index 8ae6861a5..09cc547d2 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -319,8 +319,7 @@ int InstallerBase::run()
if (m_core->isInstaller())
throw QInstaller::Error(QLatin1String("Cannot start installer binary as updater."));
checkLicense();
- m_core->setUpdater();
- m_core->updateComponentsSilently();
+ m_core->updateComponentsSilently(QStringList());
} else if (parser.isSet(QLatin1String(CommandLineOptions::ListInstalledPackages))){
if (m_core->isInstaller())
throw QInstaller::Error(QLatin1String("Cannot start installer binary as package manager."));
@@ -333,6 +332,15 @@ int InstallerBase::run()
checkLicense();
QString regexp = parser.value(QLatin1String(CommandLineOptions::ListPackages));
m_core->listAvailablePackages(regexp);
+ } else if (parser.isSet(QLatin1String(CommandLineOptions::UpdatePackages))) {
+ if (m_core->isInstaller())
+ throw QInstaller::Error(QLatin1String("Cannot start installer binary as updater."));
+ checkLicense();
+ QStringList packages;
+ const QString &value = parser.value(QLatin1String(CommandLineOptions::UpdatePackages));
+ if (!value.isEmpty())
+ packages = value.split(QLatin1Char(','), QString::SkipEmptyParts);
+ m_core->updateComponentsSilently(packages);
} else {
//create the wizard GUI
TabController controller(nullptr);