diff options
Diffstat (limited to 'src/burn/engine/core.cpp')
| -rw-r--r-- | src/burn/engine/core.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index 43f79133..9d4ea43e 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp | |||
| @@ -449,11 +449,11 @@ extern "C" HRESULT CorePlan( | |||
| 449 | 449 | ||
| 450 | if (!pEngineState->fDetected) | 450 | if (!pEngineState->fDetected) |
| 451 | { | 451 | { |
| 452 | ExitOnFailure(hr = E_INVALIDSTATE, "Plan cannot be done without a successful Detect."); | 452 | ExitWithRootFailure(hr, E_INVALIDSTATE, "Plan cannot be done without a successful Detect."); |
| 453 | } | 453 | } |
| 454 | else if (pEngineState->plan.fAffectedMachineState) | 454 | else if (pEngineState->plan.fAffectedMachineState) |
| 455 | { | 455 | { |
| 456 | ExitOnFailure(hr = E_INVALIDSTATE, "Plan requires a new successful Detect after calling Apply."); | 456 | ExitWithRootFailure(hr, E_INVALIDSTATE, "Plan requires a new successful Detect after calling Apply."); |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | // Always reset the plan. | 459 | // Always reset the plan. |
| @@ -482,6 +482,9 @@ extern "C" HRESULT CorePlan( | |||
| 482 | hr = DependencyPlanInitialize(&pEngineState->dependencies, &pEngineState->plan); | 482 | hr = DependencyPlanInitialize(&pEngineState->dependencies, &pEngineState->plan); |
| 483 | ExitOnFailure(hr, "Failed to initialize the dependencies for the plan."); | 483 | ExitOnFailure(hr, "Failed to initialize the dependencies for the plan."); |
| 484 | 484 | ||
| 485 | hr = RegistrationPlanInitialize(&pEngineState->registration); | ||
| 486 | ExitOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 487 | |||
| 485 | if (BOOTSTRAPPER_ACTION_LAYOUT == action) | 488 | if (BOOTSTRAPPER_ACTION_LAYOUT == action) |
| 486 | { | 489 | { |
| 487 | Assert(!pEngineState->plan.fPerMachine); | 490 | Assert(!pEngineState->plan.fPerMachine); |
| @@ -521,6 +524,9 @@ extern "C" HRESULT CorePlan( | |||
| 521 | { | 524 | { |
| 522 | pEngineState->plan.fPerMachine = pEngineState->registration.fPerMachine; // default the scope of the plan to the per-machine state of the bundle. | 525 | pEngineState->plan.fPerMachine = pEngineState->registration.fPerMachine; // default the scope of the plan to the per-machine state of the bundle. |
| 523 | 526 | ||
| 527 | hr = PlanRelatedBundlesInitialize(&pEngineState->userExperience, &pEngineState->registration, pEngineState->command.relationType, &pEngineState->plan); | ||
| 528 | ExitOnFailure(hr, "Failed to initialize related bundles for plan."); | ||
| 529 | |||
| 524 | hr = PlanRegistration(&pEngineState->plan, &pEngineState->registration, &pEngineState->dependencies, pEngineState->command.resumeType, pEngineState->command.relationType, &fContinuePlanning); | 530 | hr = PlanRegistration(&pEngineState->plan, &pEngineState->registration, &pEngineState->dependencies, pEngineState->command.resumeType, pEngineState->command.relationType, &fContinuePlanning); |
| 525 | ExitOnFailure(hr, "Failed to plan registration."); | 531 | ExitOnFailure(hr, "Failed to plan registration."); |
| 526 | 532 | ||
| @@ -918,8 +924,8 @@ extern "C" LPCWSTR CoreRelationTypeToCommandLineString( | |||
| 918 | case BOOTSTRAPPER_RELATION_UPDATE: | 924 | case BOOTSTRAPPER_RELATION_UPDATE: |
| 919 | wzRelationTypeCommandLine = BURN_COMMANDLINE_SWITCH_RELATED_UPDATE; | 925 | wzRelationTypeCommandLine = BURN_COMMANDLINE_SWITCH_RELATED_UPDATE; |
| 920 | break; | 926 | break; |
| 921 | case BOOTSTRAPPER_RELATION_DEPENDENT: | 927 | case BOOTSTRAPPER_RELATION_DEPENDENT_ADDON: __fallthrough; |
| 922 | break; | 928 | case BOOTSTRAPPER_RELATION_DEPENDENT_PATCH: __fallthrough; |
| 923 | case BOOTSTRAPPER_RELATION_NONE: __fallthrough; | 929 | case BOOTSTRAPPER_RELATION_NONE: __fallthrough; |
| 924 | default: | 930 | default: |
| 925 | wzRelationTypeCommandLine = NULL; | 931 | wzRelationTypeCommandLine = NULL; |
| @@ -2308,7 +2314,7 @@ static void LogRelatedBundles( | |||
| 2308 | 2314 | ||
| 2309 | if (pRelatedBundle->fPlannable) | 2315 | if (pRelatedBundle->fPlannable) |
| 2310 | { | 2316 | { |
| 2311 | LogId(REPORT_STANDARD, MSG_PLANNED_RELATED_BUNDLE, pPackage->sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingRequestStateToString(pRelatedBundle->defaultRequestedRestore), LoggingRequestStateToString(pRelatedBundle->requestedRestore), LoggingActionStateToString(pRelatedBundle->restore), LoggingDependencyActionToString(pPackage->dependencyExecute)); | 2317 | LogId(REPORT_STANDARD, MSG_PLANNED_RELATED_BUNDLE, pPackage->sczId, LoggingRelationTypeToString(pRelatedBundle->detectRelationType), LoggingPlanRelationTypeToString(pRelatedBundle->defaultPlanRelationType), LoggingPlanRelationTypeToString(pRelatedBundle->planRelationType), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingRequestStateToString(pRelatedBundle->defaultRequestedRestore), LoggingRequestStateToString(pRelatedBundle->requestedRestore), LoggingActionStateToString(pRelatedBundle->restore), LoggingDependencyActionToString(pPackage->dependencyExecute)); |
| 2312 | } | 2318 | } |
| 2313 | } | 2319 | } |
| 2314 | } | 2320 | } |
