Details
Description
When launching an installer which has the same default installation directory as an already installed product, components.xml of the installed product will be modified when cancelling the installation.
Steps to reproduce:
- with the attached projects create tutorial_v1.exe and tutorial_v2.exe using "binarycreator.exe -c config\config.xml -p packages tutorial_v1/v2.exe"
- install tutorial_v1, do not change the installation directory
- launch installer of tutorial_v2
- cancel installer
-> components.xml of tutorial_v1 installation will now contain application name and application version of tutorial_v2
Analysis:
The application name and application version are force set in PackageManagerCorePrivate::initialize(). PackagesInfo::writeToDisk() will be called from the destructor when aborting the installer. PackageInfo is marked as "modified" because package manager core set the application name and application version. --> components.xml will be rewritten.
Furthermore the installer of tutorial_v2 will read components.xml of tutorial_v1 when creating "packagesInfo" object in PackageManagerCorePrivate::initialize(), adding unrelated components. This does not seems to have further effects, though.