summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-03-28 16:17:18 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-03-29 11:26:08 +0300
commit0702bc0a81a609bdc5afbf184dfc3b26b46c8bb3 (patch)
treef677859de0ba4ce6fd0e01f59c8bb21096a7af0a /src/libs
parent1b78dcf56681a0b28e3fffd6fbb300f7303eb963 (diff)
CLI: Add error message for trying to install unstable components
Also print a general message when no components from the user selection are valid - in case the installer misses the detailed reason why components cannot be selected, at least some information is printed. Task-number: QTIFW-2591 Change-Id: I1b10e7601527ddc0192417b41691691b517139a5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/packagemanagercore.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 363609a92..af92a4d6d 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -2449,6 +2449,9 @@ bool PackageManagerCore::checkComponentsForInstallation(const QStringList &compo
} else if (!component->isCheckable()) {
errorMessage.append(tr("Cannot install component %1. Component is not checkable, meaning you "
"have to select one of the subcomponents.\n").arg(name));
+ } else if (component->isUnstable()) {
+ errorMessage.append(tr("Cannot install component %1. There was a problem loading this component, "
+ "so it is marked unstable and cannot be selected.\n").arg(name));
}
} else if (component->isInstalled()) {
errorMessage.append(tr("Component %1 already installed\n").arg(name));
@@ -2710,7 +2713,8 @@ PackageManagerCore::Status PackageManagerCore::createOfflineInstaller(const QStr
<< "Created installer to:" << offlineBinaryName();
}
} else {
- qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << errorMessage;
+ qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << errorMessage
+ << "\nNo components available with the current selection.";
}
return status();
}
@@ -2753,7 +2757,8 @@ PackageManagerCore::Status PackageManagerCore::installSelectedComponentsSilently
if (d->calculateComponentsAndRun())
qCDebug(QInstaller::lcInstallerInstallLog) << "Components installed successfully";
} else {
- qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << errorMessage;
+ qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << errorMessage
+ << "\nNo components available for installation with the current selection.";
}
return status();
}