diff options
Diffstat (limited to 'src/burn/engine/plan.cpp')
| -rw-r--r-- | src/burn/engine/plan.cpp | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index b714aab8..2649ee39 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
| @@ -9,6 +9,10 @@ | |||
| 9 | 9 | ||
| 10 | // internal function definitions | 10 | // internal function definitions |
| 11 | 11 | ||
| 12 | static void PlannedExecutePackage( | ||
| 13 | __in BURN_PLAN* pPlan, | ||
| 14 | __in BURN_PACKAGE* pPackage | ||
| 15 | ); | ||
| 12 | static void UninitializeRegistrationAction( | 16 | static void UninitializeRegistrationAction( |
| 13 | __in BURN_DEPENDENT_REGISTRATION_ACTION* pAction | 17 | __in BURN_DEPENDENT_REGISTRATION_ACTION* pAction |
| 14 | ); | 18 | ); |
| @@ -855,13 +859,13 @@ static HRESULT InitializePackage( | |||
| 855 | BOOL fBeginCalled = FALSE; | 859 | BOOL fBeginCalled = FALSE; |
| 856 | BOOTSTRAPPER_RELATION_TYPE relationType = pPlan->pCommand->relationType; | 860 | BOOTSTRAPPER_RELATION_TYPE relationType = pPlan->pCommand->relationType; |
| 857 | 861 | ||
| 858 | if (BURN_PACKAGE_TYPE_EXE == pPackage->type && pPackage->Exe.fPseudoBundle) | 862 | if (BURN_PACKAGE_TYPE_EXE == pPackage->type && pPackage->Exe.fPseudoPackage) |
| 859 | { | 863 | { |
| 860 | // Exe pseudo bundles are not configurable. | 864 | // Exe pseudo packages are not configurable. |
| 861 | // The BA already requested this package to be executed | 865 | // The BA already requested this package to be executed |
| 862 | // * by the overall plan action for UpdateReplace | 866 | // * by the overall plan action for UpdateReplace |
| 863 | // * by enabling the forward compatible bundle for Passthrough | 867 | // * by enabling the forward compatible bundle for Passthrough |
| 864 | pPackage->defaultRequested = pPackage->requested = BOOTSTRAPPER_REQUEST_STATE_PRESENT; | 868 | pPackage->defaultRequested = pPackage->requested = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; |
| 865 | ExitFunction(); | 869 | ExitFunction(); |
| 866 | } | 870 | } |
| 867 | 871 | ||
| @@ -1164,18 +1168,15 @@ extern "C" HRESULT PlanExecutePackage( | |||
| 1164 | ExitOnFailure(hr, "Failed to complete plan dependency actions for package: %ls", pPackage->sczId); | 1168 | ExitOnFailure(hr, "Failed to complete plan dependency actions for package: %ls", pPackage->sczId); |
| 1165 | 1169 | ||
| 1166 | // If we are going to take any action on this package, add progress for it. | 1170 | // If we are going to take any action on this package, add progress for it. |
| 1167 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pPackage->execute || BOOTSTRAPPER_ACTION_STATE_NONE != pPackage->rollback || pPackage->compatiblePackage.fRemove) | 1171 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pPackage->execute || BOOTSTRAPPER_ACTION_STATE_NONE != pPackage->rollback) |
| 1168 | { | 1172 | { |
| 1169 | LoggingIncrementPackageSequence(); | 1173 | PlannedExecutePackage(pPlan, pPackage); |
| 1170 | 1174 | } | |
| 1171 | ++pPlan->cExecutePackagesTotal; | ||
| 1172 | ++pPlan->cOverallProgressTicksTotal; | ||
| 1173 | 1175 | ||
| 1174 | // If package is per-machine and is being executed, flag the plan to be per-machine as well. | 1176 | // If we are going to take any action on the compatible package, add progress for it. |
| 1175 | if (pPackage->fPerMachine) | 1177 | if (pPackage->compatiblePackage.fRemove) |
| 1176 | { | 1178 | { |
| 1177 | pPlan->fPerMachine = TRUE; | 1179 | PlannedExecutePackage(pPlan, pPackage); |
| 1178 | } | ||
| 1179 | } | 1180 | } |
| 1180 | 1181 | ||
| 1181 | LExit: | 1182 | LExit: |
| @@ -1219,7 +1220,7 @@ extern "C" HRESULT PlanDefaultRelatedBundleRequestState( | |||
| 1219 | } | 1220 | } |
| 1220 | else if (BOOTSTRAPPER_ACTION_INSTALL == action || BOOTSTRAPPER_ACTION_MODIFY == action) | 1221 | else if (BOOTSTRAPPER_ACTION_INSTALL == action || BOOTSTRAPPER_ACTION_MODIFY == action) |
| 1221 | { | 1222 | { |
| 1222 | *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT; | 1223 | *pRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; |
| 1223 | } | 1224 | } |
| 1224 | else if (BOOTSTRAPPER_ACTION_REPAIR == action) | 1225 | else if (BOOTSTRAPPER_ACTION_REPAIR == action) |
| 1225 | { | 1226 | { |
| @@ -1478,16 +1479,7 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
| 1478 | // If we are going to take any action on this package, add progress for it. | 1479 | // If we are going to take any action on this package, add progress for it. |
| 1479 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pRelatedBundle->package.execute || BOOTSTRAPPER_ACTION_STATE_NONE != pRelatedBundle->package.rollback) | 1480 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pRelatedBundle->package.execute || BOOTSTRAPPER_ACTION_STATE_NONE != pRelatedBundle->package.rollback) |
| 1480 | { | 1481 | { |
| 1481 | LoggingIncrementPackageSequence(); | 1482 | PlannedExecutePackage(pPlan, &pRelatedBundle->package); |
| 1482 | |||
| 1483 | ++pPlan->cExecutePackagesTotal; | ||
| 1484 | ++pPlan->cOverallProgressTicksTotal; | ||
| 1485 | } | ||
| 1486 | |||
| 1487 | // If package is per-machine and is being executed, flag the plan to be per-machine as well. | ||
| 1488 | if (pRelatedBundle->package.fPerMachine) | ||
| 1489 | { | ||
| 1490 | pPlan->fPerMachine = TRUE; | ||
| 1491 | } | 1483 | } |
| 1492 | } | 1484 | } |
| 1493 | else if (BOOTSTRAPPER_RELATION_ADDON == pRelatedBundle->relationType || BOOTSTRAPPER_RELATION_PATCH == pRelatedBundle->relationType) | 1485 | else if (BOOTSTRAPPER_RELATION_ADDON == pRelatedBundle->relationType || BOOTSTRAPPER_RELATION_PATCH == pRelatedBundle->relationType) |
| @@ -1847,6 +1839,24 @@ LExit: | |||
| 1847 | 1839 | ||
| 1848 | // internal function definitions | 1840 | // internal function definitions |
| 1849 | 1841 | ||
| 1842 | |||
| 1843 | static void PlannedExecutePackage( | ||
| 1844 | __in BURN_PLAN* pPlan, | ||
| 1845 | __in BURN_PACKAGE* pPackage | ||
| 1846 | ) | ||
| 1847 | { | ||
| 1848 | LoggingIncrementPackageSequence(); | ||
| 1849 | |||
| 1850 | ++pPlan->cExecutePackagesTotal; | ||
| 1851 | ++pPlan->cOverallProgressTicksTotal; | ||
| 1852 | |||
| 1853 | // If package is per-machine and is being executed, flag the plan to be per-machine as well. | ||
| 1854 | if (pPackage->fPerMachine) | ||
| 1855 | { | ||
| 1856 | pPlan->fPerMachine = TRUE; | ||
| 1857 | } | ||
| 1858 | } | ||
| 1859 | |||
| 1850 | static void UninitializeRegistrationAction( | 1860 | static void UninitializeRegistrationAction( |
| 1851 | __in BURN_DEPENDENT_REGISTRATION_ACTION* pAction | 1861 | __in BURN_DEPENDENT_REGISTRATION_ACTION* pAction |
| 1852 | ) | 1862 | ) |
