diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-05-03 21:14:52 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-05-11 19:11:19 -0500 |
commit | a2f2036c8598efcb434eebeeacd7ede84ab60dfe (patch) | |
tree | 271e07336a3eb394f5f9fe4c2da0973d2b3193dc /src/burn/engine/plan.cpp | |
parent | 2f4287fdcee83b30e0f7f3ce548bcdff2ee85e1f (diff) | |
download | wix-a2f2036c8598efcb434eebeeacd7ede84ab60dfe.tar.gz wix-a2f2036c8598efcb434eebeeacd7ede84ab60dfe.tar.bz2 wix-a2f2036c8598efcb434eebeeacd7ede84ab60dfe.zip |
Cache packages that will be present for CACHE/INSTALL overall actions.
During actions that are expected to have source media available, all packages that have cacheType set to keep should be cached if the package is going to be present.
Set NetFx ExePackage Cache="no" and remove uninstall and repair arguments.
#5125
Diffstat (limited to 'src/burn/engine/plan.cpp')
-rw-r--r-- | src/burn/engine/plan.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index 327078b9..f0ae2a44 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
@@ -1077,7 +1077,7 @@ extern "C" HRESULT PlanExecutePackage( | |||
1077 | ) | 1077 | ) |
1078 | { | 1078 | { |
1079 | HRESULT hr = S_OK; | 1079 | HRESULT hr = S_OK; |
1080 | BOOL fRequestedCache = BOOTSTRAPPER_REQUEST_STATE_CACHE == pPackage->requested || ForceCache(pPlan, pPackage); | 1080 | BOOL fRequestedCache = BOOTSTRAPPER_CACHE_TYPE_REMOVE < pPackage->cacheType && (BOOTSTRAPPER_REQUEST_STATE_CACHE == pPackage->requested || ForceCache(pPlan, pPackage)); |
1081 | 1081 | ||
1082 | hr = CalculateExecuteActions(pPackage, pPlan->pActiveRollbackBoundary); | 1082 | hr = CalculateExecuteActions(pPackage, pPlan->pActiveRollbackBoundary); |
1083 | ExitOnFailure(hr, "Failed to calculate plan actions for package: %ls", pPackage->sczId); | 1083 | ExitOnFailure(hr, "Failed to calculate plan actions for package: %ls", pPackage->sczId); |
@@ -2531,8 +2531,19 @@ static BOOL ForceCache( | |||
2531 | __in BURN_PACKAGE* pPackage | 2531 | __in BURN_PACKAGE* pPackage |
2532 | ) | 2532 | ) |
2533 | { | 2533 | { |
2534 | // All packages that have cacheType set to force should be cached if the bundle is going to be present. | 2534 | switch (pPackage->cacheType) |
2535 | return BOOTSTRAPPER_CACHE_TYPE_FORCE == pPackage->cacheType && BOOTSTRAPPER_ACTION_UNINSTALL < pPlan->action; | 2535 | { |
2536 | case BOOTSTRAPPER_CACHE_TYPE_KEEP: | ||
2537 | // During actions that are expected to have source media available, | ||
2538 | // all packages that have cacheType set to keep should be cached if the package is going to be present. | ||
2539 | return (BOOTSTRAPPER_ACTION_CACHE == pPlan->action || BOOTSTRAPPER_ACTION_INSTALL == pPlan->action) && | ||
2540 | BOOTSTRAPPER_REQUEST_STATE_CACHE < pPackage->requested; | ||
2541 | case BOOTSTRAPPER_CACHE_TYPE_FORCE: | ||
2542 | // All packages that have cacheType set to force should be cached if the bundle is going to be present. | ||
2543 | return BOOTSTRAPPER_ACTION_UNINSTALL < pPlan->action; | ||
2544 | default: | ||
2545 | return FALSE; | ||
2546 | } | ||
2536 | } | 2547 | } |
2537 | 2548 | ||
2538 | static void CacheActionLog( | 2549 | static void CacheActionLog( |