From 4cd1c4e06145434ca940ac828772dc47b9d9738e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 13 Mar 2022 23:45:32 -0500 Subject: Allow the BA to override the bundle relation type during plan. --- src/burn/engine/elevation.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/burn/engine/elevation.cpp') diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index e479b6c0..636d67ce 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp @@ -874,6 +874,9 @@ extern "C" HRESULT ElevationExecuteRelatedBundle( hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->relatedBundle.action); ExitOnFailure(hr, "Failed to write action to message buffer."); + hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->relatedBundle.pRelatedBundle->planRelationType); + ExitOnFailure(hr, "Failed to write planRelationType to message buffer."); + hr = BuffWriteNumber(&pbData, &cbData, fRollback); ExitOnFailure(hr, "Failed to write rollback."); @@ -2723,6 +2726,7 @@ static HRESULT OnExecuteRelatedBundle( HRESULT hr = S_OK; SIZE_T iData = 0; LPWSTR sczPackage = NULL; + DWORD dwPlanRelationType = 0; DWORD dwRollback = 0; BURN_EXECUTE_ACTION executeAction = { }; LPWSTR sczIgnoreDependencies = NULL; @@ -2739,6 +2743,9 @@ static HRESULT OnExecuteRelatedBundle( hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.relatedBundle.action); ExitOnFailure(hr, "Failed to read action."); + hr = BuffReadNumber(pbData, cbData, &iData, &dwPlanRelationType); + ExitOnFailure(hr, "Failed to read planRelationType."); + hr = BuffReadNumber(pbData, cbData, &iData, &dwRollback); ExitOnFailure(hr, "Failed to read rollback."); @@ -2757,6 +2764,8 @@ static HRESULT OnExecuteRelatedBundle( hr = RelatedBundleFindById(pRelatedBundles, sczPackage, &executeAction.relatedBundle.pRelatedBundle); ExitOnFailure(hr, "Failed to find related bundle: %ls", sczPackage); + executeAction.relatedBundle.pRelatedBundle->planRelationType = (BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE)dwPlanRelationType; + // Pass the list of dependencies to ignore, if any, to the related bundle. if (sczIgnoreDependencies && *sczIgnoreDependencies) { -- cgit v1.2.3-55-g6feb