diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-03-13 23:51:36 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-03-14 14:53:29 -0500 |
commit | 9453eaa9a38f78e248526ddd996485140a5d4d9a (patch) | |
tree | 8ef6bda85836fd3f1b9c2c6c16cb4a994519e863 /src/burn/engine/plan.cpp | |
parent | 78125b7c4bd59468275d65b63860bdb68b1bc6f1 (diff) | |
download | wix-9453eaa9a38f78e248526ddd996485140a5d4d9a.tar.gz wix-9453eaa9a38f78e248526ddd996485140a5d4d9a.tar.bz2 wix-9453eaa9a38f78e248526ddd996485140a5d4d9a.zip |
Make engine skip planning if there are any downgrade related bundles.
Fixes 6677, 6722
Reverts 6537
Diffstat (limited to 'src/burn/engine/plan.cpp')
-rw-r--r-- | src/burn/engine/plan.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index dcb919c7..46680636 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
@@ -1328,11 +1328,12 @@ LExit: | |||
1328 | extern "C" HRESULT PlanRelatedBundlesInitialize( | 1328 | extern "C" HRESULT PlanRelatedBundlesInitialize( |
1329 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1329 | __in BURN_USER_EXPERIENCE* pUserExperience, |
1330 | __in BURN_REGISTRATION* pRegistration, | 1330 | __in BURN_REGISTRATION* pRegistration, |
1331 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | 1331 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
1332 | __in BURN_PLAN* /*pPlan*/ | 1332 | __in BURN_PLAN* pPlan |
1333 | ) | 1333 | ) |
1334 | { | 1334 | { |
1335 | HRESULT hr = S_OK; | 1335 | HRESULT hr = S_OK; |
1336 | BOOL fUninstalling = BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pPlan->action; | ||
1336 | 1337 | ||
1337 | for (DWORD i = 0; i < pRegistration->relatedBundles.cRelatedBundles; ++i) | 1338 | for (DWORD i = 0; i < pRegistration->relatedBundles.cRelatedBundles; ++i) |
1338 | { | 1339 | { |
@@ -1356,6 +1357,19 @@ extern "C" HRESULT PlanRelatedBundlesInitialize( | |||
1356 | 1357 | ||
1357 | hr = UserExperienceOnPlanRelatedBundleType(pUserExperience, pRelatedBundle->package.sczId, &pRelatedBundle->planRelationType); | 1358 | hr = UserExperienceOnPlanRelatedBundleType(pUserExperience, pRelatedBundle->package.sczId, &pRelatedBundle->planRelationType); |
1358 | ExitOnRootFailure(hr, "BA aborted plan related bundle type."); | 1359 | ExitOnRootFailure(hr, "BA aborted plan related bundle type."); |
1360 | |||
1361 | if (BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DOWNGRADE == pRelatedBundle->planRelationType && | ||
1362 | pRelatedBundle->fPlannable && !fUninstalling && BOOTSTRAPPER_RELATION_UPGRADE != relationType) | ||
1363 | { | ||
1364 | if (!pPlan->fDowngrade) | ||
1365 | { | ||
1366 | pPlan->fDowngrade = TRUE; | ||
1367 | |||
1368 | LogId(REPORT_STANDARD, MSG_PLAN_SKIPPED_DUE_TO_DOWNGRADE); | ||
1369 | } | ||
1370 | |||
1371 | LogId(REPORT_VERBOSE, MSG_UPGRADE_BUNDLE_DOWNGRADE, pRelatedBundle->package.sczId, pRelatedBundle->pVersion->sczVersion); | ||
1372 | } | ||
1359 | } | 1373 | } |
1360 | 1374 | ||
1361 | RelatedBundlesSortPlan(&pRegistration->relatedBundles); | 1375 | RelatedBundlesSortPlan(&pRegistration->relatedBundles); |
@@ -3011,6 +3025,7 @@ extern "C" void PlanDump( | |||
3011 | LogStringLine(PlanDumpLevel, " can affect machine state: %hs", LoggingTrueFalseToString(pPlan->fCanAffectMachineState)); | 3025 | LogStringLine(PlanDumpLevel, " can affect machine state: %hs", LoggingTrueFalseToString(pPlan->fCanAffectMachineState)); |
3012 | LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); | 3026 | LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); |
3013 | LogStringLine(PlanDumpLevel, " disallow-removal: %hs", LoggingTrueFalseToString(pPlan->fDisallowRemoval)); | 3027 | LogStringLine(PlanDumpLevel, " disallow-removal: %hs", LoggingTrueFalseToString(pPlan->fDisallowRemoval)); |
3028 | LogStringLine(PlanDumpLevel, " downgrade: %hs", LoggingTrueFalseToString(pPlan->fDowngrade)); | ||
3014 | LogStringLine(PlanDumpLevel, " registration options: %hs", LoggingRegistrationOptionsToString(pPlan->dwRegistrationOperations)); | 3029 | LogStringLine(PlanDumpLevel, " registration options: %hs", LoggingRegistrationOptionsToString(pPlan->dwRegistrationOperations)); |
3015 | LogStringLine(PlanDumpLevel, " estimated size: %llu", pPlan->qwEstimatedSize); | 3030 | LogStringLine(PlanDumpLevel, " estimated size: %llu", pPlan->qwEstimatedSize); |
3016 | if (pPlan->sczLayoutDirectory) | 3031 | if (pPlan->sczLayoutDirectory) |