summaryrefslogtreecommitdiffstats
path: root/src/sdk
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-02-25 16:03:54 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-02-27 09:03:58 +0000
commit0cb97d954d14b8703169a2b7208eea660c9691a8 (patch)
treede8b79ea4e6ccd86044856a3cdc665a51ba7255a /src/sdk
parentccafccfb442b2f1b3d0b70f5d899716cb787ee5a (diff)
Add command line option to disable checking of free space on target3.2.2-rc
Also move functionality to PackageManagerCore::checkAvailableSpace() for more convenient later usage, if we want to use this without starting the Wizard GUI. Task-number: QTIFW-1602 Change-Id: I4f2d3cc78bc542475fe9c51b9364b1b221098e4a Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r--src/sdk/commandlineparser.cpp3
-rw-r--r--src/sdk/constants.h1
-rw-r--r--src/sdk/installerbase.cpp3
3 files changed, 7 insertions, 0 deletions
diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp
index 3d0d2412a..e29ae2df7 100644
--- a/src/sdk/commandlineparser.cpp
+++ b/src/sdk/commandlineparser.cpp
@@ -71,6 +71,9 @@ CommandLineParser::CommandLineParser()
m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::NoForceInstallation),
QLatin1String("Allow deselecting components that are marked as forced.")));
+ m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::NoSizeChecking),
+ QLatin1String("Disable checking of free space for installation target.")));
+
m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::ShowVirtualComponents),
QLatin1String("Show virtual components in installer and package manager.")));
diff --git a/src/sdk/constants.h b/src/sdk/constants.h
index e9eca9103..a1f7b12cf 100644
--- a/src/sdk/constants.h
+++ b/src/sdk/constants.h
@@ -44,6 +44,7 @@ const char CheckUpdates[] = "checkupdates";
const char Updater[] = "updater";
const char ManagePackages[] = "manage-packages";
const char NoForceInstallation[] = "no-force-installations";
+const char NoSizeChecking[] = "no-size-checking";
const char ShowVirtualComponents[] = "show-virtual-components";
const char LoggingRules[] = "logging-rules";
const char CreateLocalRepository[] = "create-local-repository";
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index 247b4ab57..e6cf150ca 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -252,6 +252,9 @@ int InstallerBase::run()
}
m_core->setTemporaryRepositories(repoList, false, true);
}
+ // Disable checking for free space on target
+ if (parser.isSet(QLatin1String(CommandLineOptions::NoSizeChecking)))
+ m_core->setCheckAvailableSpace(false);
QInstaller::PackageManagerCore::setNoForceInstallation(parser
.isSet(QLatin1String(CommandLineOptions::NoForceInstallation)));