diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-03-10 18:18:38 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-03-11 20:24:18 -0600 |
| commit | af68033509730ffe01602f839861a47287bb709f (patch) | |
| tree | 2960f6cdd023e74a4ca2bbc49d0294b7bfbed5c5 /src/engine/detect.cpp | |
| parent | 10ef9d5bfbf81f454113a1c2716009831a916222 (diff) | |
| download | wix-af68033509730ffe01602f839861a47287bb709f.tar.gz wix-af68033509730ffe01602f839861a47287bb709f.tar.bz2 wix-af68033509730ffe01602f839861a47287bb709f.zip | |
Handle when related bundles have an uninstall key but aren't cached.
#4991
Diffstat (limited to 'src/engine/detect.cpp')
| -rw-r--r-- | src/engine/detect.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/engine/detect.cpp b/src/engine/detect.cpp index 74e8b9ca..8ca74986 100644 --- a/src/engine/detect.cpp +++ b/src/engine/detect.cpp | |||
| @@ -143,13 +143,16 @@ extern "C" HRESULT DetectForwardCompatibleBundles( | |||
| 143 | 143 | ||
| 144 | if (nCompareResult <= 0) | 144 | if (nCompareResult <= 0) |
| 145 | { | 145 | { |
| 146 | pRelatedBundle->fForwardCompatible = TRUE; | 146 | if (pRelatedBundle->fPlannable) |
| 147 | pRegistration->fForwardCompatibleBundleExists = TRUE; | 147 | { |
| 148 | pRelatedBundle->fForwardCompatible = TRUE; | ||
| 149 | pRegistration->fForwardCompatibleBundleExists = TRUE; | ||
| 150 | } | ||
| 148 | 151 | ||
| 149 | hr = UserExperienceOnDetectForwardCompatibleBundle(pUX, pRelatedBundle->package.sczId, pRelatedBundle->relationType, pRelatedBundle->sczTag, pRelatedBundle->package.fPerMachine, pRelatedBundle->pVersion); | 152 | hr = UserExperienceOnDetectForwardCompatibleBundle(pUX, pRelatedBundle->package.sczId, pRelatedBundle->relationType, pRelatedBundle->sczTag, pRelatedBundle->package.fPerMachine, pRelatedBundle->pVersion, BURN_CACHE_STATE_COMPLETE != pRelatedBundle->package.cache); |
| 150 | ExitOnRootFailure(hr, "BA aborted detect forward compatible bundle."); | 153 | ExitOnRootFailure(hr, "BA aborted detect forward compatible bundle."); |
| 151 | 154 | ||
| 152 | LogId(REPORT_STANDARD, MSG_DETECTED_FORWARD_COMPATIBLE_BUNDLE, pRelatedBundle->package.sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingPerMachineToString(pRelatedBundle->package.fPerMachine), pRelatedBundle->pVersion->sczVersion); | 155 | LogId(REPORT_STANDARD, MSG_DETECTED_FORWARD_COMPATIBLE_BUNDLE, pRelatedBundle->package.sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingPerMachineToString(pRelatedBundle->package.fPerMachine), pRelatedBundle->pVersion->sczVersion, LoggingCacheStateToString(pRelatedBundle->package.cache)); |
| 153 | } | 156 | } |
| 154 | } | 157 | } |
| 155 | } | 158 | } |
| @@ -222,13 +225,13 @@ extern "C" HRESULT DetectReportRelatedBundles( | |||
| 222 | break; | 225 | break; |
| 223 | } | 226 | } |
| 224 | 227 | ||
| 225 | LogId(REPORT_STANDARD, MSG_DETECTED_RELATED_BUNDLE, pRelatedBundle->package.sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingPerMachineToString(pRelatedBundle->package.fPerMachine), pRelatedBundle->pVersion->sczVersion, LoggingRelatedOperationToString(operation)); | 228 | LogId(REPORT_STANDARD, MSG_DETECTED_RELATED_BUNDLE, pRelatedBundle->package.sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingPerMachineToString(pRelatedBundle->package.fPerMachine), pRelatedBundle->pVersion->sczVersion, LoggingRelatedOperationToString(operation), LoggingCacheStateToString(pRelatedBundle->package.cache)); |
| 226 | 229 | ||
| 227 | hr = UserExperienceOnDetectRelatedBundle(pUX, pRelatedBundle->package.sczId, pRelatedBundle->relationType, pRelatedBundle->sczTag, pRelatedBundle->package.fPerMachine, pRelatedBundle->pVersion, operation); | 230 | hr = UserExperienceOnDetectRelatedBundle(pUX, pRelatedBundle->package.sczId, pRelatedBundle->relationType, pRelatedBundle->sczTag, pRelatedBundle->package.fPerMachine, pRelatedBundle->pVersion, operation, BURN_CACHE_STATE_COMPLETE != pRelatedBundle->package.cache); |
| 228 | ExitOnRootFailure(hr, "BA aborted detect related bundle."); | 231 | ExitOnRootFailure(hr, "BA aborted detect related bundle."); |
| 229 | 232 | ||
| 230 | // For now, if any related bundles will be executed during uninstall by default then never automatically clean up the bundle. | 233 | // For now, if any related bundles will be executed during uninstall by default then never automatically clean up the bundle. |
| 231 | if (*pfEligibleForCleanup) | 234 | if (*pfEligibleForCleanup && pRelatedBundle->fPlannable) |
| 232 | { | 235 | { |
| 233 | uninstallRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE; | 236 | uninstallRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE; |
| 234 | hr = PlanDefaultRelatedBundleRequestState(relationType, pRelatedBundle->relationType, BOOTSTRAPPER_ACTION_UNINSTALL, pRegistration->pVersion, pRelatedBundle->pVersion, &uninstallRequestState); | 237 | hr = PlanDefaultRelatedBundleRequestState(relationType, pRelatedBundle->relationType, BOOTSTRAPPER_ACTION_UNINSTALL, pRegistration->pVersion, pRelatedBundle->pVersion, &uninstallRequestState); |
