summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix replaced component uninstall4.3Katja Marttila2022-03-221-1/+3
| | | | | | | | | | Replaced component was uninstalled when installing other components although no update or install was requested to the component. Fixes also a bug when some components were uninstalled unvisible from user. Task-number: QTIFW-2577 Change-Id: I6a7e9ce4a56991dfbdea53eb376d782dfb5d050a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Do not block installation when there are conflicting component namesArttu Tarkiainen2022-01-061-1/+4
| | | | | | | | | | | | - Components with conflicting original identifiers are not registered. - Components with conflicting tree names are registered with the original name, if installer is configured to allow unstable components. Otherwise they are not registered. - Unaffected components can be installed as usual. Task-number: QTIFW-2444 Change-Id: Ic1eaf3878f974185bc68202930134e5199dc0398 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix qbsp adding from GUIKatja Marttila2021-09-021-4/+0
| | | | | | | | | | | Qbsp package adding failed using gui if the package with the same name existed in the component tree. Also increased priority to qbsp package so that if the same name and version exists in the component tree then qbsp package is used. Task-number: QTIFW-2312 Change-Id: I732fef1a7ba503d2332f411e15b6873c63dcf630 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: improvements to 'search' and 'install' command outputArttu Tarkiainen2021-03-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | Previously subcomponents of a virtual component were shown on search results, and trying to install these would print a bit vague message: 'Component not found'. As the sub-branches of virtual component nodes are hidden on GUI, we should also hide them when using CLI search, and give a more appropriate error message why the component cannot be explicitly selected for installation, if the user still tries to do so. Also some minor refactoring to the handling of supplemental information about binary type of the running installer/mt. This change does not fix the possible case of an install script changing the 'virtual'-state of a component, as it would require downloading and evaluating the full metadata for repositories (or components), which would impose a performance penalty to search. Task-number: QTIFW-2168 Change-Id: Ibacaca23c38f5ea98967955d91849cefc1f11f61 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add alternative way to update components from repositoryKatja Marttila2021-03-031-0/+1
| | | | | | | | | | | | | | Components can be updated from online repository using version number. Sometimes there is a need to update to an older version which is now possible by using content sha. Content sha can be added to repository with repogen --sha-update <component_id>. If there is a new content sha available in the repository, component is updated although it version number might be smaller. After the content sha is removed from online repository, the normal update with version number is performed. Task-number: QTIFW-1798 Change-Id: Id9e32b0345af5101cccaf6e30c81bd39691d9590 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Try rerunning execute operationKatja Marttila2021-02-051-9/+3
| | | | | | | | | | | | | Execute operation can have hard coded paths to program which is executed. In case the program is relocated, UNDO operation will fail as it will not find the program. Implemented new XXXX_OLD value which can be used for overwriting the hardcoded value. In case the program execution fails, program is tried to launch again with the replaced value. Task-number: QTIFW-2125 Change-Id: I446a4c423e53cc4ffc6e5e25617d2400945ac3d9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add support for generating offline installer from onlineArttu Tarkiainen2021-01-151-0/+10
| | | | | | Task-number: QTIFW-1945 Change-Id: Ic8a076a28385e99ad09cfbccd07c7012d6570639 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Print package information in xml formatKatja Marttila2020-11-251-3/+1
| | | | | | | | | Also removed logging categories for package information, the full package information can be printed by increasing the verbosity level. Task-number: QTIFW-1950 Change-Id: I4bce019a63ba1fbf48e3bb0ca45511e42d4974c9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Arrange licenses and filter duplicatesJarkko Lehtoranta2020-11-061-0/+1
| | | | | | | | | | | - Add a "priority" attribute to the "License" element used in "package.xml" for arranging licenses by priority in the LicenseAgreementPage and in CLI. Priority >0 shows the license on top of others. - Arrange the licenses with the same priority alphabetically - Filter duplicate licenses from the LicenseAgreementPage and from CLI Change-Id: I1dcacdd417d2383b8dc18149e4de329fbf11cfe8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: Ask user confirmation before performing installer actionsArttu Tarkiainen2020-08-211-0/+2
| | | | | | | | Also add new option --confirm-command to skip the interactive query. Task-number: QTIFW-1834 Change-Id: I1c63fd990431c792a523da7047637f54b193bee6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Documentation fixesKatja Marttila2020-07-031-0/+2
| | | | | | | | Added missing documentation and fixed warnings. KDUpdate documentation not added in this commit. Change-Id: Idc0b167bed95b7ae4a46a350290fdb241aa94448 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add function to get information if default install is performedKatja Marttila2020-06-251-0/+1
| | | | | | Task-number: QTIFW-1847 Change-Id: I737b9b527c25e089386f74038b57a83f3d7e2062 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to select/deselect component from script using coreKatja Marttila2020-06-251-0/+1
| | | | | | | | | We might not have componentselection page visible, so we need a possibility to select/deselect components also using core. Task-number: QTIFW-1847 Change-Id: I85ccf0602144f843c15ef7c0818ba435d36bdac5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Refactor maintenance tool writing conditionsArttu Tarkiainen2020-06-101-0/+1
| | | | | | | | | This change fixes a bug caused by a blocking runInstaller() call in PerformInstallationPage::entering() and also contains refactoring to related parts of code. Change-Id: Ic3309707c1f975a646937aa96fc407a3e5931359 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix const correctness for CLI license acceptance functionsArttu Tarkiainen2020-06-031-2/+2
| | | | | Change-Id: If3fdafc982c8f2180fc15529bba1bd408d9fbfee Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Remove orphan PackageManagerCorePrivate::runUpdater() functionArttu Tarkiainen2020-06-031-1/+0
| | | | | Change-Id: I045bdd030277eb192d08749bd0208ac5d6d7a52c Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add possibility to accept licenses from CLIArttu Tarkiainen2020-04-281-0/+3
| | | | | | | | | | | License agreements can be accepted automatically by using command line option --accept-licenses or interactively by answering queries with either "Accept", "Reject" or "Show" selections. Task-number: QTIFW-1742 Task-number: QTIFW-1745 Change-Id: Iff46b44f91faddb7f163b299994167ab16df68b3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add function to allow additional processes to be runKatja Marttila2020-03-311-0/+1
| | | | | | | | | | | | | | Maintenancetool does not allow updating install if running processes are found from install directory. Only maintenancetool process was allowed, otherwise the install failed with query to shut down processes. This commit adds a function to extend the allowed processes to be run, this is mandatory when running tests as test executable lies in the install directory. Task-number: QTIFW-1019 Change-Id: I5422b0327e3f77edf3f9c88c74f40eff5cc8c830 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/3.2' to masterKatja Marttila2020-03-161-0/+1
|\ | | | | | | Change-Id: Ia4cf718409ce431cce8d766865ecec506426afb9
| * Add command line option to disable checking of free space on target3.2.2-rcArttu Tarkiainen2020-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Add command line option to start the installer binary as uninstallerArttu Tarkiainen2020-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add option "--uninstaller" to start the installer binary explicitly as uninstaller. This complements options "--updater" and "--manage-packages". Add convenience functions for setting and checking if the magic binary marker has been set by the user. Task-number: QTIFW-1639 Change-Id: Ie40ba9c56e09be079e309bca985b19a8a7bef7ef Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Do not prompt admin query when command line interface is usedArttu Tarkiainen2020-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | If admin rights are needed, fail and require to install with sudo. This is how command line interfaces commonly behave. Add convenience functions for setting and checking if the installer is used from command line. Task-number: QTIFW-1598 Change-Id: Ib28d3be08254dade5d9b2d29da9232064f008eb4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Remove obsolete sharedFlag() functionKatja Marttila2020-01-161-1/+0
| | | | | | | | | | | | | | | | sharedFlag is deprecated since 2.0.0 and it was no longer used, setValue should be used instead. Change-Id: I94ebcf90c422e719ccc853ad67db32840f806514 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Merge remote-tracking branch 'origin/3.1' into masterKatja Marttila2019-11-201-1/+0
|\| | | | | | | Change-Id: Icc077e3757b84b2367b2a7dd9c1e389f6845365b
| * Refactor setting and checking of file permissionsArttu Tarkiainen2019-08-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create methods to explicitly set default file permissions on Unix platforms, use these on installer created files and installation target directory. Add unit test for introduced functions. Remove method introduced in 46aecc23b2983c807ff2232ae9cb9651b4d2fdc2 as the same effect is achieved more efficiently by ensuring target directory will be written with explicit permissions on initial installation. Unlike the removed method, this will also not break if an installed component contains owner non-writable directories. Further simplify PackageManagerCore::directoryWritable() introduced in 89f772f819178ee2502768c3d259d22ecb910fbe. Remove orphan unit test for removed PackageManagerCore::subdirectoriesWritable(). This does not change permissions of files and directories extracted for installed components. Task-number: QTIFW-1412 Change-Id: I59698c78aceef874b1f79482bff5a618b9a1b536 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | List available packages from command lineKatja Marttila2019-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Available packages can be listed from command line with --listPackages <regexp>. All packages can be listed with --listPackages . . By default package id, name and version are listed in output. In case you want to see all the packet information use logging category --logging-rules ifw.package.*=true. See --help for more detailed information on how to use logging category. Change-Id: Ic0815d2274643e3fb3f0670ed9036fe765805c0e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Refactor code to functions which command line interface needsKatja Marttila2019-11-191-0/+3
|/ | | | | | | | These are needed in multiple places while implementing CLI so created common functions to avoid code repeat. Change-Id: I2b30bedf5de838211f48bd1669c59ff3a17f640e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Gain admin rights for writing MaintenanceTool config files if neededArttu Tarkiainen2019-06-141-1/+2
| | | | | | | | | | | | | | | | Running MaintenanceTool from an elevated directory didn't do proper checks for file writing rights when parsing Updates.xml from a repository, for example when a default repository contains actions inside <RepositoryUpdate> tags the MaintenanceTool couldn't write changes to the .ini file immediately. Make MaintenanceTool do proper rights checking when parsing Updates.xml. Create uniform methods for checking directory writing access as it is used on several occasions. Add tests for directory checking methods. Task-number: QTIFW-1363 Change-Id: I6d634ddbd59429e5b98af1d8010e70a71de40f69 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix MaintenanceTool file write permission check on Linux and macOSArttu Tarkiainen2019-06-031-0/+2
| | | | | | | | | | | | | Running the Qt installer on Linux and macOS with sudo will leave the installation target directory and some installation files writable by other users than their owner (root). Make MaintenanceTool check over all subdirectories in the installation directory for write permission so that admin rights can be always requested when needed. Task-number: QTIFW-1324 Change-Id: I9b314853634642b0be1fb3ea7a9164a2d4beb853 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Maintenance Tool: Change text in Select Components view when selection of ↵Arttu Tarkiainen2019-05-021-0/+1
| | | | | | | | | components is not possible Task-number: QTIFW-1241 Change-Id: Ib3e67e26b5fd4cf856c4b95f7fe542484e4955ff Reviewed-by: Janne Anttila <janne.anttila@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Revert RemoteFileEngineHandler removalKatja Marttila2019-01-151-0/+2
| | | | | | | | Seems this is used for gaining admin rights in Windows Task-id: QTIFW-1254 Change-Id: Ia169200ead7a95d152378ba68ba9b8ad3054d5bb Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Remove unused variableKatja Marttila2018-12-181-2/+0
| | | | | Change-Id: Ie9fc97244b10e821965ac42ce3c9ab3720aa3d00 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Add progressbar to indicate unzip job is proceedingKatja Marttila2017-05-101-0/+4
| | | | | | | | | | | When a big compressed package is unzipped, it seemed that the installer hanged as there was no indication that the job is still ongoing. Added undetermined state to progress bar as unzip job does not inform the progress state. Task-number: QTIFW-967 Change-Id: I21ca394e1856038c51413f9e5011307ae7a9850a Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix install corrupt with silentInstallKatja Marttila2017-05-101-0/+2
| | | | | | | | | | | | | If there are updates available for a component that is executable and the executable is running, installer is unable to update the component and results to a corrupted install. Check that there are no processes running from the install tree and cancel update if there are any. The update is canceled if there are processes running even if the process does not get update. Task-number: QTIFW-969 Change-Id: I5614cdd21d8538ccf8b0d114d3616804fe367667 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-301-17/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/lib7z_create.h src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h src/libs/kdtools/localpackagehub.cpp src/libs/kdtools/localpackagehub.h src/libs/kdtools/updatefinder.cpp src/libs/kdtools/updatefinder.h tools/binarycreator/resources/mkdmg.sh Change-Id: Iab2513f549832d2e750e77131c673457ab265af4
| * License header update to GPL-EXCEPTKatja Marttila2017-01-261-17/+12
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* | allow installing compressed packagesKatja Marttila2016-11-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces new feature to add 7z packages to be installed. Packages must be installer repositories (created with repogen), compressed to 7z file and named as qtbsp or 7z. Selecting compressed package is done either with button in component selection page or with --installCompressedRepository parameter given to installer or to maintenancetool. Button will not be created by default. If you want to show the button either build IFW with DEFINES+=INSTALLCOMPRESSED or enable the button in control script with allowCompressedRepositoryInstall() in ComponentSelectionPageCallback Task-number: QTIFW-886 Change-Id: Ia060092c348991d5195393b7dc154205f8bf92a5 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-201-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: installerfw.pri src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h sync.profile Change-Id: Ifdc8b065f89b7e241bd3788ed79768e21888161f
| * Update license headersIikka Eklund2015-12-291-4/+3
| | | | | | | | | | | | | | | | | | Update existing license headers. LGPL -> LGPLv21. Update copyright year as well. Change-Id: Ie1d71f8c68186b8f625f409ddf94691f178093c9 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* | Missed to rename classes and to update docs and tests.Karsten Heimrich2015-09-071-3/+3
| | | | | | | | | | Change-Id: I2d79ab4094cb9706287d44160543c19b35a66c95 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Rename files. Remove {kd} prefix. Remove {kdupdater} prefix.Karsten Heimrich2015-07-141-2/+2
| | | | | | | | | | Change-Id: I88c93cab718f4659296d5f7f562beefd747a366f Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename classes to reflect their use. Remove typedef.Karsten Heimrich2015-05-061-1/+1
| | | | | | | | | | Change-Id: I5abb64d356a0951671487b60529a0ca26b0909be Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Replace UpdateSourcesInfo and UpdateSourceInfo classes.Karsten Heimrich2015-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Introduce a new struct PackageInfo, which is similar to the removed UpdateSourceInfo struct. The new struct name reflects the actual use better, as we deal with package here (either packages to install or updates to apply) and not updates only. Also remove the container class UpdateSourcesInfo, we can simple reuse a existing Qt container here. Adjust all occurrences that use/ used the classes. Change-Id: I526e24cbf1664f0ab0ad18153f60c2c10b6909d8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Remove (KDUpdater}Application, functionality has been merge.Karsten Heimrich2015-05-051-23/+0
| | | | | | | | | | | | Task-number: QTIFW-215 Change-Id: I7a9215c8c5d5eae0d66d57650f5b8b82dd4d40b4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Take over the last used methods from {KD}Application.Karsten Heimrich2015-05-051-0/+2
| | | | | | | | | | Change-Id: I9aaac261bef7aaa48cf0beaee83e15cc5bccd437 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the PackagesInfo handling out of {KDUpdater}Application.Karsten Heimrich2015-05-051-0/+1
| | | | | | | | | | | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the PackagesInfo class itself. Change-Id: I6876a5887c498aa20fb54e016159223e336d9362 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the UpdateSourcesInfo out of {KDUpdater}Application.Karsten Heimrich2015-05-051-0/+2
|/ | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the UpdateSourcesInfo class itself. Change-Id: I99cc34e9089da63087892d8d3540522e9f59b2c8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Use a UUID as uninstall registry subkeyChristoph Vogtländer2015-01-231-1/+1
| | | | | | | Change-Id: I365e3bdf529bed7bff526b772d9dec5260d71ba4 Task-Id: QTIFW-615 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Small cosmetical changes, no functional.karsten.heimrich@theqtcompany.com2014-11-211-1/+2
| | | | | Change-Id: Ic984503444187dfcfcfa83f82768bebb329381d0 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>