diff options
author | Katja Marttila <katja.marttila@qt.io> | 2024-01-23 11:43:45 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2024-03-05 10:12:17 +0000 |
commit | 49c7011844a85bc50004e64ee5e56705202f10a5 (patch) | |
tree | 59e92d12a1f4b481f8cb9ee1faa0335370848624 /src/libs/installer/packagemanagercore.h | |
parent | 3f5a21fe502a513f1cc3bdee1863688a85481fef (diff) |
CLI: Perform commands primarily from default repositories
Especially in installers which contains huge amount of repositories, it
takes a long time to perform commands from CLI. If the repositories are
filtered using categories, it saves a lot of time if the components to
install/update etc. are tried to install/update from the defaultly selected
repository categories. Assuming that the component is found
from the defaultly selected repositories. If the component is not found from
defaultly selected repository categories, then all categories are searched for
the component.
Implemented also a filter logic, where the components to install are
searched earlier, if the component is not found then we can exit early.
Task-number: QTIFW-3251
Change-Id: I1274b5f56dbff293554cb21839a8cea63a7d2dcc
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore.h')
-rw-r--r-- | src/libs/installer/packagemanagercore.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h index 009f956d9..d36e8e0f4 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h @@ -84,7 +84,8 @@ public: Canceled = 3, Unfinished = 4, ForceUpdate = 5, - EssentialUpdated = 6 + EssentialUpdated = 6, + NoPackagesFound = 7 }; Status status() const; QString error() const; @@ -149,8 +150,9 @@ public: void setProxyFactory(PackageManagerProxyFactory *factory); PackagesList remotePackages(); - bool fetchRemotePackagesTree(); + bool fetchRemotePackagesTree(const QStringList& components = QStringList()); bool fetchCompressedPackagesTree(); + bool fetchPackagesWithFallbackRepositories(const QStringList& components, bool &fallBackReposFetched); bool run(); void reset(); @@ -478,7 +480,7 @@ private: bool fetchPackagesTree(const PackagesList &packages, const LocalPackagesMap installedPackages); bool componentUninstallableFromCommandLine(const QString &componentName); - bool checkComponentsForInstallation(const QStringList &names, QString &errorMessage); + bool checkComponentsForInstallation(const QStringList &names, QString &errorMessage, bool &unstableAliasFound); private: PackageManagerCorePrivate *const d; |