diff options
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( |