diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-01-03 15:35:14 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-01-04 19:19:43 -0600 |
| commit | 1f5314302b3c8bc1977aed79df1d05c52608f382 (patch) | |
| tree | f0fef3a4462352c914a4cc9413515d07f2244703 /src/burn/engine/plan.cpp | |
| parent | db44f6cf3b1eb476e47384f2eccba5712808def5 (diff) | |
| download | wix-1f5314302b3c8bc1977aed79df1d05c52608f382.tar.gz wix-1f5314302b3c8bc1977aed79df1d05c52608f382.tar.bz2 wix-1f5314302b3c8bc1977aed79df1d05c52608f382.zip | |
Don't assume Exe packages with Burn protocol are bundles.
Related to #3693
Diffstat (limited to 'src/burn/engine/plan.cpp')
| -rw-r--r-- | src/burn/engine/plan.cpp | 128 |
1 files changed, 67 insertions, 61 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index 0f63a945..e0e9a82b 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
| @@ -36,16 +36,13 @@ static HRESULT PlanPackagesHelper( | |||
| 36 | __in BURN_USER_EXPERIENCE* pUX, | 36 | __in BURN_USER_EXPERIENCE* pUX, |
| 37 | __in BURN_PLAN* pPlan, | 37 | __in BURN_PLAN* pPlan, |
| 38 | __in BURN_LOGGING* pLog, | 38 | __in BURN_LOGGING* pLog, |
| 39 | __in BURN_VARIABLES* pVariables, | 39 | __in BURN_VARIABLES* pVariables |
| 40 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 41 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 42 | ); | 40 | ); |
| 43 | static HRESULT InitializePackage( | 41 | static HRESULT InitializePackage( |
| 44 | __in BURN_PLAN* pPlan, | 42 | __in BURN_PLAN* pPlan, |
| 45 | __in BURN_USER_EXPERIENCE* pUX, | 43 | __in BURN_USER_EXPERIENCE* pUX, |
| 46 | __in BURN_VARIABLES* pVariables, | 44 | __in BURN_VARIABLES* pVariables, |
| 47 | __in BURN_PACKAGE* pPackage, | 45 | __in BURN_PACKAGE* pPackage |
| 48 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 49 | ); | 46 | ); |
| 50 | static HRESULT ProcessPackage( | 47 | static HRESULT ProcessPackage( |
| 51 | __in BOOL fBundlePerMachine, | 48 | __in BOOL fBundlePerMachine, |
| @@ -54,7 +51,6 @@ static HRESULT ProcessPackage( | |||
| 54 | __in BURN_PACKAGE* pPackage, | 51 | __in BURN_PACKAGE* pPackage, |
| 55 | __in BURN_LOGGING* pLog, | 52 | __in BURN_LOGGING* pLog, |
| 56 | __in BURN_VARIABLES* pVariables, | 53 | __in BURN_VARIABLES* pVariables, |
| 57 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 58 | __inout BURN_ROLLBACK_BOUNDARY** ppRollbackBoundary | 54 | __inout BURN_ROLLBACK_BOUNDARY** ppRollbackBoundary |
| 59 | ); | 55 | ); |
| 60 | static HRESULT ProcessPackageRollbackBoundary( | 56 | static HRESULT ProcessPackageRollbackBoundary( |
| @@ -266,10 +262,10 @@ extern "C" void PlanUninitializeExecuteAction( | |||
| 266 | { | 262 | { |
| 267 | switch (pExecuteAction->type) | 263 | switch (pExecuteAction->type) |
| 268 | { | 264 | { |
| 269 | case BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE: | 265 | case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE: |
| 270 | ReleaseStr(pExecuteAction->exePackage.sczIgnoreDependencies); | 266 | ReleaseStr(pExecuteAction->relatedBundle.sczIgnoreDependencies); |
| 271 | ReleaseStr(pExecuteAction->exePackage.sczAncestors); | 267 | ReleaseStr(pExecuteAction->relatedBundle.sczAncestors); |
| 272 | ReleaseStr(pExecuteAction->exePackage.sczEngineWorkingDirectory); | 268 | ReleaseStr(pExecuteAction->relatedBundle.sczEngineWorkingDirectory); |
| 273 | break; | 269 | break; |
| 274 | 270 | ||
| 275 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: | 271 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: |
| @@ -500,14 +496,12 @@ extern "C" HRESULT PlanPackages( | |||
| 500 | __in BURN_PACKAGES* pPackages, | 496 | __in BURN_PACKAGES* pPackages, |
| 501 | __in BURN_PLAN* pPlan, | 497 | __in BURN_PLAN* pPlan, |
| 502 | __in BURN_LOGGING* pLog, | 498 | __in BURN_LOGGING* pLog, |
| 503 | __in BURN_VARIABLES* pVariables, | 499 | __in BURN_VARIABLES* pVariables |
| 504 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 505 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 506 | ) | 500 | ) |
| 507 | { | 501 | { |
| 508 | HRESULT hr = S_OK; | 502 | HRESULT hr = S_OK; |
| 509 | 503 | ||
| 510 | hr = PlanPackagesHelper(pPackages->rgPackages, pPackages->cPackages, pUX, pPlan, pLog, pVariables, display, relationType); | 504 | hr = PlanPackagesHelper(pPackages->rgPackages, pPackages->cPackages, pUX, pPlan, pLog, pVariables); |
| 511 | 505 | ||
| 512 | return hr; | 506 | return hr; |
| 513 | } | 507 | } |
| @@ -712,15 +706,13 @@ extern "C" HRESULT PlanPassThroughBundle( | |||
| 712 | __in BURN_PACKAGE* pPackage, | 706 | __in BURN_PACKAGE* pPackage, |
| 713 | __in BURN_PLAN* pPlan, | 707 | __in BURN_PLAN* pPlan, |
| 714 | __in BURN_LOGGING* pLog, | 708 | __in BURN_LOGGING* pLog, |
| 715 | __in BURN_VARIABLES* pVariables, | 709 | __in BURN_VARIABLES* pVariables |
| 716 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 717 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 718 | ) | 710 | ) |
| 719 | { | 711 | { |
| 720 | HRESULT hr = S_OK; | 712 | HRESULT hr = S_OK; |
| 721 | 713 | ||
| 722 | // Plan passthrough package. | 714 | // Plan passthrough package. |
| 723 | hr = PlanPackagesHelper(pPackage, 1, pUX, pPlan, pLog, pVariables, display, relationType); | 715 | hr = PlanPackagesHelper(pPackage, 1, pUX, pPlan, pLog, pVariables); |
| 724 | ExitOnFailure(hr, "Failed to process passthrough package."); | 716 | ExitOnFailure(hr, "Failed to process passthrough package."); |
| 725 | 717 | ||
| 726 | LExit: | 718 | LExit: |
| @@ -732,15 +724,17 @@ extern "C" HRESULT PlanUpdateBundle( | |||
| 732 | __in BURN_PACKAGE* pPackage, | 724 | __in BURN_PACKAGE* pPackage, |
| 733 | __in BURN_PLAN* pPlan, | 725 | __in BURN_PLAN* pPlan, |
| 734 | __in BURN_LOGGING* pLog, | 726 | __in BURN_LOGGING* pLog, |
| 735 | __in BURN_VARIABLES* pVariables, | 727 | __in BURN_VARIABLES* pVariables |
| 736 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 737 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 738 | ) | 728 | ) |
| 739 | { | 729 | { |
| 740 | HRESULT hr = S_OK; | 730 | HRESULT hr = S_OK; |
| 741 | 731 | ||
| 732 | Assert(!pPackage->fPerMachine); | ||
| 733 | Assert(BURN_PACKAGE_TYPE_EXE == pPackage->type); | ||
| 734 | pPackage->Exe.fFireAndForget = BOOTSTRAPPER_ACTION_UPDATE_REPLACE == pPlan->action; | ||
| 735 | |||
| 742 | // Plan update package. | 736 | // Plan update package. |
| 743 | hr = PlanPackagesHelper(pPackage, 1, pUX, pPlan, pLog, pVariables, display, relationType); | 737 | hr = PlanPackagesHelper(pPackage, 1, pUX, pPlan, pLog, pVariables); |
| 744 | ExitOnFailure(hr, "Failed to process update package."); | 738 | ExitOnFailure(hr, "Failed to process update package."); |
| 745 | 739 | ||
| 746 | LExit: | 740 | LExit: |
| @@ -753,9 +747,7 @@ static HRESULT PlanPackagesHelper( | |||
| 753 | __in BURN_USER_EXPERIENCE* pUX, | 747 | __in BURN_USER_EXPERIENCE* pUX, |
| 754 | __in BURN_PLAN* pPlan, | 748 | __in BURN_PLAN* pPlan, |
| 755 | __in BURN_LOGGING* pLog, | 749 | __in BURN_LOGGING* pLog, |
| 756 | __in BURN_VARIABLES* pVariables, | 750 | __in BURN_VARIABLES* pVariables |
| 757 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 758 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 759 | ) | 751 | ) |
| 760 | { | 752 | { |
| 761 | HRESULT hr = S_OK; | 753 | HRESULT hr = S_OK; |
| @@ -768,7 +760,7 @@ static HRESULT PlanPackagesHelper( | |||
| 768 | DWORD iPackage = (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) ? cPackages - 1 - i : i; | 760 | DWORD iPackage = (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) ? cPackages - 1 - i : i; |
| 769 | BURN_PACKAGE* pPackage = rgPackages + iPackage; | 761 | BURN_PACKAGE* pPackage = rgPackages + iPackage; |
| 770 | 762 | ||
| 771 | hr = InitializePackage(pPlan, pUX, pVariables, pPackage, relationType); | 763 | hr = InitializePackage(pPlan, pUX, pVariables, pPackage); |
| 772 | ExitOnFailure(hr, "Failed to initialize package."); | 764 | ExitOnFailure(hr, "Failed to initialize package."); |
| 773 | } | 765 | } |
| 774 | 766 | ||
| @@ -791,7 +783,7 @@ static HRESULT PlanPackagesHelper( | |||
| 791 | DWORD iPackage = (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) ? cPackages - 1 - i : i; | 783 | DWORD iPackage = (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) ? cPackages - 1 - i : i; |
| 792 | BURN_PACKAGE* pPackage = rgPackages + iPackage; | 784 | BURN_PACKAGE* pPackage = rgPackages + iPackage; |
| 793 | 785 | ||
| 794 | hr = ProcessPackage(fBundlePerMachine, pUX, pPlan, pPackage, pLog, pVariables, display, &pRollbackBoundary); | 786 | hr = ProcessPackage(fBundlePerMachine, pUX, pPlan, pPackage, pLog, pVariables, &pRollbackBoundary); |
| 795 | ExitOnFailure(hr, "Failed to process package."); | 787 | ExitOnFailure(hr, "Failed to process package."); |
| 796 | } | 788 | } |
| 797 | 789 | ||
| @@ -841,14 +833,24 @@ static HRESULT InitializePackage( | |||
| 841 | __in BURN_PLAN* pPlan, | 833 | __in BURN_PLAN* pPlan, |
| 842 | __in BURN_USER_EXPERIENCE* pUX, | 834 | __in BURN_USER_EXPERIENCE* pUX, |
| 843 | __in BURN_VARIABLES* pVariables, | 835 | __in BURN_VARIABLES* pVariables, |
| 844 | __in BURN_PACKAGE* pPackage, | 836 | __in BURN_PACKAGE* pPackage |
| 845 | __in BOOTSTRAPPER_RELATION_TYPE relationType | ||
| 846 | ) | 837 | ) |
| 847 | { | 838 | { |
| 848 | HRESULT hr = S_OK; | 839 | HRESULT hr = S_OK; |
| 849 | BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition = BOOTSTRAPPER_PACKAGE_CONDITION_DEFAULT; | 840 | BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition = BOOTSTRAPPER_PACKAGE_CONDITION_DEFAULT; |
| 850 | BOOL fInstallCondition = FALSE; | 841 | BOOL fInstallCondition = FALSE; |
| 851 | BOOL fBeginCalled = FALSE; | 842 | BOOL fBeginCalled = FALSE; |
| 843 | BOOTSTRAPPER_RELATION_TYPE relationType = pPlan->pCommand->relationType; | ||
| 844 | |||
| 845 | if (BURN_PACKAGE_TYPE_EXE == pPackage->type && pPackage->Exe.fPseudoBundle) | ||
| 846 | { | ||
| 847 | // Exe pseudo bundles are not configurable. | ||
| 848 | // The BA already requested this package to be executed | ||
| 849 | // * by the overall plan action for UpdateReplace | ||
| 850 | // * by enabling the forward compatible bundle for Passthrough | ||
| 851 | pPackage->defaultRequested = pPackage->requested = BOOTSTRAPPER_REQUEST_STATE_PRESENT; | ||
| 852 | ExitFunction(); | ||
| 853 | } | ||
| 852 | 854 | ||
| 853 | if (pPackage->fCanAffectRegistration) | 855 | if (pPackage->fCanAffectRegistration) |
| 854 | { | 856 | { |
| @@ -896,7 +898,6 @@ static HRESULT ProcessPackage( | |||
| 896 | __in BURN_PACKAGE* pPackage, | 898 | __in BURN_PACKAGE* pPackage, |
| 897 | __in BURN_LOGGING* pLog, | 899 | __in BURN_LOGGING* pLog, |
| 898 | __in BURN_VARIABLES* pVariables, | 900 | __in BURN_VARIABLES* pVariables, |
| 899 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 900 | __inout BURN_ROLLBACK_BOUNDARY** ppRollbackBoundary | 901 | __inout BURN_ROLLBACK_BOUNDARY** ppRollbackBoundary |
| 901 | ) | 902 | ) |
| 902 | { | 903 | { |
| @@ -920,7 +921,7 @@ static HRESULT ProcessPackage( | |||
| 920 | if (BOOTSTRAPPER_REQUEST_STATE_NONE != pPackage->requested) | 921 | if (BOOTSTRAPPER_REQUEST_STATE_NONE != pPackage->requested) |
| 921 | { | 922 | { |
| 922 | // If the package is in a requested state, plan it. | 923 | // If the package is in a requested state, plan it. |
| 923 | hr = PlanExecutePackage(fBundlePerMachine, display, pUX, pPlan, pPackage, pLog, pVariables); | 924 | hr = PlanExecutePackage(fBundlePerMachine, pUX, pPlan, pPackage, pLog, pVariables); |
| 924 | ExitOnFailure(hr, "Failed to plan execute package."); | 925 | ExitOnFailure(hr, "Failed to plan execute package."); |
| 925 | } | 926 | } |
| 926 | else | 927 | else |
| @@ -1064,7 +1065,6 @@ LExit: | |||
| 1064 | 1065 | ||
| 1065 | extern "C" HRESULT PlanExecutePackage( | 1066 | extern "C" HRESULT PlanExecutePackage( |
| 1066 | __in BOOL fPerMachine, | 1067 | __in BOOL fPerMachine, |
| 1067 | __in BOOTSTRAPPER_DISPLAY display, | ||
| 1068 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1068 | __in BURN_USER_EXPERIENCE* pUserExperience, |
| 1069 | __in BURN_PLAN* pPlan, | 1069 | __in BURN_PLAN* pPlan, |
| 1070 | __in BURN_PACKAGE* pPackage, | 1070 | __in BURN_PACKAGE* pPackage, |
| @@ -1073,6 +1073,7 @@ extern "C" HRESULT PlanExecutePackage( | |||
| 1073 | ) | 1073 | ) |
| 1074 | { | 1074 | { |
| 1075 | HRESULT hr = S_OK; | 1075 | HRESULT hr = S_OK; |
| 1076 | BOOTSTRAPPER_DISPLAY display = pPlan->pCommand->display; | ||
| 1076 | BOOL fRequestedCache = BOOTSTRAPPER_CACHE_TYPE_REMOVE < pPackage->cacheType && (BOOTSTRAPPER_REQUEST_STATE_CACHE == pPackage->requested || ForceCache(pPlan, pPackage)); | 1077 | BOOL fRequestedCache = BOOTSTRAPPER_CACHE_TYPE_REMOVE < pPackage->cacheType && (BOOTSTRAPPER_REQUEST_STATE_CACHE == pPackage->requested || ForceCache(pPlan, pPackage)); |
| 1077 | 1078 | ||
| 1078 | hr = CalculateExecuteActions(pPackage, pPlan->pActiveRollbackBoundary); | 1079 | hr = CalculateExecuteActions(pPackage, pPlan->pActiveRollbackBoundary); |
| @@ -1124,7 +1125,7 @@ extern "C" HRESULT PlanExecutePackage( | |||
| 1124 | switch (pPackage->type) | 1125 | switch (pPackage->type) |
| 1125 | { | 1126 | { |
| 1126 | case BURN_PACKAGE_TYPE_EXE: | 1127 | case BURN_PACKAGE_TYPE_EXE: |
| 1127 | hr = ExeEnginePlanAddPackage(NULL, pPackage, pPlan, pLog, pVariables); | 1128 | hr = ExeEnginePlanAddPackage(pPackage, pPlan, pLog, pVariables); |
| 1128 | break; | 1129 | break; |
| 1129 | 1130 | ||
| 1130 | case BURN_PACKAGE_TYPE_MSI: | 1131 | case BURN_PACKAGE_TYPE_MSI: |
| @@ -1288,8 +1289,8 @@ extern "C" HRESULT PlanRelatedBundlesBegin( | |||
| 1288 | } | 1289 | } |
| 1289 | 1290 | ||
| 1290 | // Pass along any ancestors and ourself to prevent infinite loops. | 1291 | // Pass along any ancestors and ourself to prevent infinite loops. |
| 1291 | pRelatedBundle->package.Exe.wzAncestors = pRegistration->sczBundlePackageAncestors; | 1292 | pRelatedBundle->package.Bundle.wzAncestors = pRegistration->sczBundlePackageAncestors; |
| 1292 | pRelatedBundle->package.Exe.wzEngineWorkingDirectory = pPlan->pInternalCommand->sczEngineWorkingDirectory; | 1293 | pRelatedBundle->package.Bundle.wzEngineWorkingDirectory = pPlan->pInternalCommand->sczEngineWorkingDirectory; |
| 1293 | 1294 | ||
| 1294 | hr = PlanDefaultRelatedBundleRequestState(relationType, pRelatedBundle->relationType, pPlan->action, pRegistration->pVersion, pRelatedBundle->pVersion, &pRelatedBundle->package.requested); | 1295 | hr = PlanDefaultRelatedBundleRequestState(relationType, pRelatedBundle->relationType, pPlan->action, pRegistration->pVersion, pRelatedBundle->pVersion, &pRelatedBundle->package.requested); |
| 1295 | ExitOnFailure(hr, "Failed to get default request state for related bundle."); | 1296 | ExitOnFailure(hr, "Failed to get default request state for related bundle."); |
| @@ -1349,37 +1350,38 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
| 1349 | 1350 | ||
| 1350 | for (DWORD i = 0; i < pPlan->cExecuteActions; ++i) | 1351 | for (DWORD i = 0; i < pPlan->cExecuteActions; ++i) |
| 1351 | { | 1352 | { |
| 1352 | if (BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE == pPlan->rgExecuteActions[i].type && BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].exePackage.action) | 1353 | switch (pPlan->rgExecuteActions[i].type) |
| 1353 | { | 1354 | { |
| 1354 | fExecutingAnyPackage = TRUE; | 1355 | case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE: |
| 1355 | 1356 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].relatedBundle.action) | |
| 1356 | BURN_PACKAGE* pPackage = pPlan->rgExecuteActions[i].packageProvider.pPackage; | ||
| 1357 | if (BURN_PACKAGE_TYPE_EXE == pPackage->type && BURN_EXE_PROTOCOL_TYPE_BURN == pPackage->Exe.protocol) | ||
| 1358 | { | 1357 | { |
| 1359 | if (0 < pPackage->cDependencyProviders) | 1358 | fExecutingAnyPackage = TRUE; |
| 1359 | |||
| 1360 | BURN_PACKAGE* pPackage = &pPlan->rgExecuteActions[i].relatedBundle.pRelatedBundle->package; | ||
| 1361 | if (pPackage->cDependencyProviders) | ||
| 1360 | { | 1362 | { |
| 1361 | // Bundles only support a single provider key. | 1363 | // Bundles only support a single provider key. |
| 1362 | const BURN_DEPENDENCY_PROVIDER* pProvider = pPackage->rgDependencyProviders; | 1364 | const BURN_DEPENDENCY_PROVIDER* pProvider = pPackage->rgDependencyProviders; |
| 1363 | DictAddKey(sdProviderKeys, pProvider->sczKey); | 1365 | DictAddKey(sdProviderKeys, pProvider->sczKey); |
| 1364 | } | 1366 | } |
| 1365 | } | 1367 | } |
| 1366 | } | 1368 | break; |
| 1367 | else | ||
| 1368 | { | ||
| 1369 | switch (pPlan->rgExecuteActions[i].type) | ||
| 1370 | { | ||
| 1371 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: | ||
| 1372 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].msiPackage.action); | ||
| 1373 | break; | ||
| 1374 | 1369 | ||
| 1375 | case BURN_EXECUTE_ACTION_TYPE_MSP_TARGET: | 1370 | case BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE: |
| 1376 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].mspTarget.action); | 1371 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].exePackage.action); |
| 1377 | break; | 1372 | break; |
| 1378 | 1373 | ||
| 1379 | case BURN_EXECUTE_ACTION_TYPE_MSU_PACKAGE: | 1374 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: |
| 1380 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].msuPackage.action); | 1375 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].msiPackage.action); |
| 1381 | break; | 1376 | break; |
| 1382 | } | 1377 | |
| 1378 | case BURN_EXECUTE_ACTION_TYPE_MSP_TARGET: | ||
| 1379 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].mspTarget.action); | ||
| 1380 | break; | ||
| 1381 | |||
| 1382 | case BURN_EXECUTE_ACTION_TYPE_MSU_PACKAGE: | ||
| 1383 | fExecutingAnyPackage |= (BOOTSTRAPPER_ACTION_STATE_NONE != pPlan->rgExecuteActions[i].msuPackage.action); | ||
| 1384 | break; | ||
| 1383 | } | 1385 | } |
| 1384 | } | 1386 | } |
| 1385 | 1387 | ||
| @@ -1422,7 +1424,7 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
| 1422 | if (BOOTSTRAPPER_RELATION_ADDON == pRelatedBundle->relationType || BOOTSTRAPPER_RELATION_PATCH == pRelatedBundle->relationType) | 1424 | if (BOOTSTRAPPER_RELATION_ADDON == pRelatedBundle->relationType || BOOTSTRAPPER_RELATION_PATCH == pRelatedBundle->relationType) |
| 1423 | { | 1425 | { |
| 1424 | // Addon and patch bundles will be passed a list of dependencies to ignore for planning. | 1426 | // Addon and patch bundles will be passed a list of dependencies to ignore for planning. |
| 1425 | hr = StrAllocString(&pRelatedBundle->package.Exe.sczIgnoreDependencies, sczIgnoreDependencies, 0); | 1427 | hr = StrAllocString(&pRelatedBundle->package.Bundle.sczIgnoreDependencies, sczIgnoreDependencies, 0); |
| 1426 | ExitOnFailure(hr, "Failed to copy the list of dependencies to ignore."); | 1428 | ExitOnFailure(hr, "Failed to copy the list of dependencies to ignore."); |
| 1427 | 1429 | ||
| 1428 | // Uninstall addons and patches early in the chain, before other packages are uninstalled. | 1430 | // Uninstall addons and patches early in the chain, before other packages are uninstalled. |
| @@ -1434,8 +1436,8 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
| 1434 | 1436 | ||
| 1435 | if (BOOTSTRAPPER_REQUEST_STATE_NONE != pRelatedBundle->package.requested) | 1437 | if (BOOTSTRAPPER_REQUEST_STATE_NONE != pRelatedBundle->package.requested) |
| 1436 | { | 1438 | { |
| 1437 | hr = ExeEnginePlanCalculatePackage(&pRelatedBundle->package); | 1439 | hr = BundlePackageEnginePlanCalculatePackage(&pRelatedBundle->package); |
| 1438 | ExitOnFailure(hr, "Failed to calcuate plan for related bundle: %ls", pRelatedBundle->package.sczId); | 1440 | ExitOnFailure(hr, "Failed to calculate plan for related bundle: %ls", pRelatedBundle->package.sczId); |
| 1439 | 1441 | ||
| 1440 | // Calculate package states based on reference count for addon and patch related bundles. | 1442 | // Calculate package states based on reference count for addon and patch related bundles. |
| 1441 | if (BOOTSTRAPPER_RELATION_ADDON == pRelatedBundle->relationType || BOOTSTRAPPER_RELATION_PATCH == pRelatedBundle->relationType) | 1443 | if (BOOTSTRAPPER_RELATION_ADDON == pRelatedBundle->relationType || BOOTSTRAPPER_RELATION_PATCH == pRelatedBundle->relationType) |
| @@ -1450,7 +1452,7 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
| 1450 | } | 1452 | } |
| 1451 | } | 1453 | } |
| 1452 | 1454 | ||
| 1453 | hr = ExeEnginePlanAddPackage(pdwInsertIndex, &pRelatedBundle->package, pPlan, pLog, pVariables); | 1455 | hr = BundlePackageEnginePlanAddRelatedBundle(pdwInsertIndex, pRelatedBundle, pPlan, pLog, pVariables); |
| 1454 | ExitOnFailure(hr, "Failed to add to plan related bundle: %ls", pRelatedBundle->package.sczId); | 1456 | ExitOnFailure(hr, "Failed to add to plan related bundle: %ls", pRelatedBundle->package.sczId); |
| 1455 | 1457 | ||
| 1456 | // Calculate package states based on reference count for addon and patch related bundles. | 1458 | // Calculate package states based on reference count for addon and patch related bundles. |
| @@ -2603,8 +2605,12 @@ static void ExecuteActionLog( | |||
| 2603 | LogStringLine(PlanDumpLevel, "%ls action[%u]: PACKAGE_DEPENDENCY package id: %ls, bundle provider key: %ls, action: %hs", wzBase, iAction, pAction->packageDependency.pPackage->sczId, pAction->packageDependency.sczBundleProviderKey, LoggingDependencyActionToString(pAction->packageDependency.action)); | 2605 | LogStringLine(PlanDumpLevel, "%ls action[%u]: PACKAGE_DEPENDENCY package id: %ls, bundle provider key: %ls, action: %hs", wzBase, iAction, pAction->packageDependency.pPackage->sczId, pAction->packageDependency.sczBundleProviderKey, LoggingDependencyActionToString(pAction->packageDependency.action)); |
| 2604 | break; | 2606 | break; |
| 2605 | 2607 | ||
| 2608 | case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE: | ||
| 2609 | LogStringLine(PlanDumpLevel, "%ls action[%u]: RELATED_BUNDLE package id: %ls, action: %hs, ignore dependencies: %ls", wzBase, iAction, pAction->relatedBundle.pRelatedBundle->package.sczId, LoggingActionStateToString(pAction->relatedBundle.action), pAction->relatedBundle.sczIgnoreDependencies); | ||
| 2610 | break; | ||
| 2611 | |||
| 2606 | case BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE: | 2612 | case BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE: |
| 2607 | LogStringLine(PlanDumpLevel, "%ls action[%u]: EXE_PACKAGE package id: %ls, action: %hs, ignore dependencies: %ls", wzBase, iAction, pAction->exePackage.pPackage->sczId, LoggingActionStateToString(pAction->exePackage.action), pAction->exePackage.sczIgnoreDependencies); | 2613 | LogStringLine(PlanDumpLevel, "%ls action[%u]: EXE_PACKAGE package id: %ls, action: %hs", wzBase, iAction, pAction->exePackage.pPackage->sczId, LoggingActionStateToString(pAction->exePackage.action)); |
| 2608 | break; | 2614 | break; |
| 2609 | 2615 | ||
| 2610 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: | 2616 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: |
