@joebigelow / wix-1 / commits / 67dd3ced

Don't cache pass through bundles.

Sean Hall committed May 6, 2021 at 16:48 UTC 67dd3ced3b383eb8423156cdabd3f9ce037caba8
1 file changed +12 -8
src/burn/engine/plan.cpp
+12 -8
@@ -33,7 +33,6 @@ static void ResetPlannedRollbackBoundaryState(
33 static HRESULT PlanPackagesHelper(
34 __in BURN_PACKAGE* rgPackages,
35 __in DWORD cPackages,
36 - __in BOOL fPlanCleanPackages,
36 __in BURN_USER_EXPERIENCE* pUX,
37 __in BURN_PLAN* pPlan,
38 __in BURN_LOGGING* pLog,
@@ -513,7 +512,7 @@ extern "C" HRESULT PlanPackages(
512 {
513 HRESULT hr = S_OK;
514
516 - hr = PlanPackagesHelper(pPackages->rgPackages, pPackages->cPackages, TRUE, pUX, pPlan, pLog, pVariables, display, relationType);
515 + hr = PlanPackagesHelper(pPackages->rgPackages, pPackages->cPackages, pUX, pPlan, pLog, pVariables, display, relationType);
516
517 return hr;
518 }
@@ -725,9 +724,7 @@ extern "C" HRESULT PlanPassThroughBundle(
724 HRESULT hr = S_OK;
725
726 // Plan passthrough package.
728 - // Passthrough packages are never cleaned up by the calling bundle (they delete themselves when appropriate)
729 - // so we don't need to plan clean up.
730 - hr = PlanPackagesHelper(pPackage, 1, FALSE, pUX, pPlan, pLog, pVariables, display, relationType);
727 + hr = PlanPackagesHelper(pPackage, 1, pUX, pPlan, pLog, pVariables, display, relationType);
728 ExitOnFailure(hr, "Failed to process passthrough package.");
729
730 LExit:
@@ -747,7 +744,7 @@ extern "C" HRESULT PlanUpdateBundle(
744 HRESULT hr = S_OK;
745
746 // Plan update package.
750 - hr = PlanPackagesHelper(pPackage, 1, TRUE, pUX, pPlan, pLog, pVariables, display, relationType);
747 + hr = PlanPackagesHelper(pPackage, 1, pUX, pPlan, pLog, pVariables, display, relationType);
748 ExitOnFailure(hr, "Failed to process update package.");
749
750 LExit:
@@ -757,7 +754,6 @@ LExit:
754 static HRESULT PlanPackagesHelper(
755 __in BURN_PACKAGE* rgPackages,
756 __in DWORD cPackages,
760 - __in BOOL fPlanCleanPackages,
757 __in BURN_USER_EXPERIENCE* pUX,
758 __in BURN_PLAN* pPlan,
759 __in BURN_LOGGING* pLog,
@@ -813,7 +809,8 @@ static HRESULT PlanPackagesHelper(
809 pRollbackBoundary = NULL;
810 }
811
816 - if (fPlanCleanPackages)
812 + // Passthrough packages are never cleaned up by the calling bundle (they delete themselves when appropriate).
813 + if (!pPlan->fEnabledForwardCompatibleBundle)
814 {
815 // Plan clean up of packages.
816 for (DWORD i = 0; i < cPackages; ++i)
@@ -1051,6 +1048,8 @@ extern "C" HRESULT PlanLayoutPackage(
1048 HRESULT hr = S_OK;
1049 BURN_CACHE_ACTION* pCacheAction = NULL;
1050
1051 + AssertSz(!pPlan->fEnabledForwardCompatibleBundle, "Passthrough packages must already be cached");
1052 +
1053 hr = ProcessPayloadGroup(pPlan, &pPackage->payloads);
1054 ExitOnFailure(hr, "Failed to process payload group for package: %ls.", pPackage->sczId);
1055
@@ -2079,6 +2078,11 @@ static HRESULT AddCachePackageHelper(
2078 BURN_CACHE_ACTION* pCacheAction = NULL;
2079 DWORD dwCheckpoint = 0;
2080
2081 + if (pPlan->fEnabledForwardCompatibleBundle) // Passthrough packages must already be cached.
2082 + {
2083 + ExitFunction();
2084 + }
2085 +
2086 BOOL fPlanned = AlreadyPlannedCachePackage(pPlan, pPackage->sczId, phSyncpointEvent);
2087 if (fPlanned)
2088 {