diff options
Diffstat (limited to 'src/burn/engine/plan.cpp')
-rw-r--r-- | src/burn/engine/plan.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index 79b7c98f..8c5b7051 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
@@ -444,7 +444,7 @@ extern "C" HRESULT PlanForwardCompatibleBundles( | |||
444 | } | 444 | } |
445 | 445 | ||
446 | // Only change the recommendation if an active parent was provided. | 446 | // Only change the recommendation if an active parent was provided. |
447 | if (pRegistration->sczActiveParent && *pRegistration->sczActiveParent) | 447 | if (pPlan->pInternalCommand->sczActiveParent && *pPlan->pInternalCommand->sczActiveParent) |
448 | { | 448 | { |
449 | // On install, recommend running the forward compatible bundle because there is an active parent. This | 449 | // On install, recommend running the forward compatible bundle because there is an active parent. This |
450 | // will essentially register the parent with the forward compatible bundle. | 450 | // will essentially register the parent with the forward compatible bundle. |
@@ -480,7 +480,7 @@ extern "C" HRESULT PlanForwardCompatibleBundles( | |||
480 | 480 | ||
481 | if (!fIgnoreBundle) | 481 | if (!fIgnoreBundle) |
482 | { | 482 | { |
483 | hr = PseudoBundleInitializePassthrough(&pPlan->forwardCompatibleBundle, pCommand, NULL, pRegistration->sczActiveParent, pRegistration->sczAncestors, &pRelatedBundle->package); | 483 | hr = PseudoBundleInitializePassthrough(&pPlan->forwardCompatibleBundle, pPlan->pInternalCommand, pCommand, NULL, pRegistration->sczAncestors, &pRelatedBundle->package); |
484 | ExitOnFailure(hr, "Failed to initialize pass through bundle."); | 484 | ExitOnFailure(hr, "Failed to initialize pass through bundle."); |
485 | 485 | ||
486 | pPlan->fEnabledForwardCompatibleBundle = TRUE; | 486 | pPlan->fEnabledForwardCompatibleBundle = TRUE; |
@@ -512,6 +512,7 @@ extern "C" HRESULT PlanPackages( | |||
512 | extern "C" HRESULT PlanRegistration( | 512 | extern "C" HRESULT PlanRegistration( |
513 | __in BURN_PLAN* pPlan, | 513 | __in BURN_PLAN* pPlan, |
514 | __in BURN_REGISTRATION* pRegistration, | 514 | __in BURN_REGISTRATION* pRegistration, |
515 | __in BURN_DEPENDENCIES* pDependencies, | ||
515 | __in BOOTSTRAPPER_RESUME_TYPE /*resumeType*/, | 516 | __in BOOTSTRAPPER_RESUME_TYPE /*resumeType*/, |
516 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 517 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
517 | __inout BOOL* pfContinuePlanning | 518 | __inout BOOL* pfContinuePlanning |
@@ -523,7 +524,7 @@ extern "C" HRESULT PlanRegistration( | |||
523 | 524 | ||
524 | pPlan->fCanAffectMachineState = TRUE; // register the bundle since we're modifying machine state. | 525 | pPlan->fCanAffectMachineState = TRUE; // register the bundle since we're modifying machine state. |
525 | pPlan->fDisallowRemoval = FALSE; // by default the bundle can be planned to be removed | 526 | pPlan->fDisallowRemoval = FALSE; // by default the bundle can be planned to be removed |
526 | pPlan->fIgnoreAllDependents = pRegistration->fIgnoreAllDependents; | 527 | pPlan->fIgnoreAllDependents = pDependencies->fIgnoreAllDependents; |
527 | 528 | ||
528 | // Ensure the bundle is cached if not running from the cache. | 529 | // Ensure the bundle is cached if not running from the cache. |
529 | if (!CacheBundleRunningFromCache(pPlan->pCache)) | 530 | if (!CacheBundleRunningFromCache(pPlan->pCache)) |
@@ -560,10 +561,10 @@ extern "C" HRESULT PlanRegistration( | |||
560 | // would prevent self-removal. | 561 | // would prevent self-removal. |
561 | if (pRegistration->fSelfRegisteredAsDependent) | 562 | if (pRegistration->fSelfRegisteredAsDependent) |
562 | { | 563 | { |
563 | hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER, pRegistration->wzSelfDependent, pRegistration->sczId); | 564 | hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER, pDependencies->wzSelfDependent, pRegistration->sczId); |
564 | ExitOnFailure(hr, "Failed to allocate registration action."); | 565 | ExitOnFailure(hr, "Failed to allocate registration action."); |
565 | 566 | ||
566 | hr = DependencyAddIgnoreDependencies(sdIgnoreDependents, pRegistration->wzSelfDependent); | 567 | hr = DependencyAddIgnoreDependencies(sdIgnoreDependents, pDependencies->wzSelfDependent); |
567 | ExitOnFailure(hr, "Failed to add self-dependent to ignore dependents."); | 568 | ExitOnFailure(hr, "Failed to add self-dependent to ignore dependents."); |
568 | } | 569 | } |
569 | 570 | ||
@@ -575,9 +576,9 @@ extern "C" HRESULT PlanRegistration( | |||
575 | if (BOOTSTRAPPER_RELATION_UPGRADE != relationType) | 576 | if (BOOTSTRAPPER_RELATION_UPGRADE != relationType) |
576 | { | 577 | { |
577 | // If there were other dependencies to ignore, add them. | 578 | // If there were other dependencies to ignore, add them. |
578 | for (DWORD iDependency = 0; iDependency < pRegistration->cIgnoredDependencies; ++iDependency) | 579 | for (DWORD iDependency = 0; iDependency < pDependencies->cIgnoredDependencies; ++iDependency) |
579 | { | 580 | { |
580 | DEPENDENCY* pDependency = pRegistration->rgIgnoredDependencies + iDependency; | 581 | DEPENDENCY* pDependency = pDependencies->rgIgnoredDependencies + iDependency; |
581 | 582 | ||
582 | hr = DictKeyExists(sdIgnoreDependents, pDependency->sczKey); | 583 | hr = DictKeyExists(sdIgnoreDependents, pDependency->sczKey); |
583 | if (E_NOTFOUND != hr) | 584 | if (E_NOTFOUND != hr) |
@@ -689,9 +690,9 @@ extern "C" HRESULT PlanRegistration( | |||
689 | // Only do the following if we decided there was a dependent self to register. If so and and an explicit parent was | 690 | // Only do the following if we decided there was a dependent self to register. If so and and an explicit parent was |
690 | // provided, register dependent self. Otherwise, if this bundle is not an addon or patch bundle then self-regisiter | 691 | // provided, register dependent self. Otherwise, if this bundle is not an addon or patch bundle then self-regisiter |
691 | // as our own dependent. | 692 | // as our own dependent. |
692 | if (pRegistration->wzSelfDependent && !pRegistration->fSelfRegisteredAsDependent && (pRegistration->sczActiveParent || !fAddonOrPatchBundle)) | 693 | if (pDependencies->wzSelfDependent && !pRegistration->fSelfRegisteredAsDependent && (pDependencies->wzActiveParent || !fAddonOrPatchBundle)) |
693 | { | 694 | { |
694 | hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER, pRegistration->wzSelfDependent, pRegistration->sczId); | 695 | hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER, pDependencies->wzSelfDependent, pRegistration->sczId); |
695 | ExitOnFailure(hr, "Failed to add registration action for self dependent."); | 696 | ExitOnFailure(hr, "Failed to add registration action for self dependent."); |
696 | } | 697 | } |
697 | } | 698 | } |
@@ -1774,8 +1775,8 @@ LExit: | |||
1774 | 1775 | ||
1775 | *******************************************************************/ | 1776 | *******************************************************************/ |
1776 | extern "C" HRESULT PlanSetResumeCommand( | 1777 | extern "C" HRESULT PlanSetResumeCommand( |
1778 | __in BURN_PLAN* pPlan, | ||
1777 | __in BURN_REGISTRATION* pRegistration, | 1779 | __in BURN_REGISTRATION* pRegistration, |
1778 | __in BOOTSTRAPPER_ACTION action, | ||
1779 | __in BOOTSTRAPPER_COMMAND* pCommand, | 1780 | __in BOOTSTRAPPER_COMMAND* pCommand, |
1780 | __in BURN_LOGGING* pLog | 1781 | __in BURN_LOGGING* pLog |
1781 | ) | 1782 | ) |
@@ -1783,7 +1784,7 @@ extern "C" HRESULT PlanSetResumeCommand( | |||
1783 | HRESULT hr = S_OK; | 1784 | HRESULT hr = S_OK; |
1784 | 1785 | ||
1785 | // build the resume command-line. | 1786 | // build the resume command-line. |
1786 | hr = CoreRecreateCommandLine(&pRegistration->sczResumeCommandLine, action, pCommand->display, pCommand->relationType, pCommand->fPassthrough, pRegistration->sczActiveParent, pRegistration->sczAncestors, pLog->sczPath, pCommand->wzCommandLine); | 1787 | hr = CoreRecreateCommandLine(&pRegistration->sczResumeCommandLine, pPlan->action, pPlan->pInternalCommand, pCommand, pCommand->relationType, pCommand->fPassthrough, pRegistration->sczAncestors, pLog->sczPath, pCommand->wzCommandLine); |
1787 | ExitOnFailure(hr, "Failed to recreate resume command-line."); | 1788 | ExitOnFailure(hr, "Failed to recreate resume command-line."); |
1788 | 1789 | ||
1789 | LExit: | 1790 | LExit: |