diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-03-10 18:18:38 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-03-11 20:24:18 -0600 |
commit | af68033509730ffe01602f839861a47287bb709f (patch) | |
tree | 2960f6cdd023e74a4ca2bbc49d0294b7bfbed5c5 /src/engine/core.cpp | |
parent | 10ef9d5bfbf81f454113a1c2716009831a916222 (diff) | |
download | wix-af68033509730ffe01602f839861a47287bb709f.tar.gz wix-af68033509730ffe01602f839861a47287bb709f.tar.bz2 wix-af68033509730ffe01602f839861a47287bb709f.zip |
Handle when related bundles have an uninstall key but aren't cached.
#4991
Diffstat (limited to 'src/engine/core.cpp')
-rw-r--r-- | src/engine/core.cpp | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/engine/core.cpp b/src/engine/core.cpp index eb8a84fe..50ed6ea0 100644 --- a/src/engine/core.cpp +++ b/src/engine/core.cpp | |||
@@ -59,6 +59,10 @@ static void LogPackages( | |||
59 | __in const BURN_RELATED_BUNDLES* pRelatedBundles, | 59 | __in const BURN_RELATED_BUNDLES* pRelatedBundles, |
60 | __in const BOOTSTRAPPER_ACTION action | 60 | __in const BOOTSTRAPPER_ACTION action |
61 | ); | 61 | ); |
62 | static void LogRelatedBundles( | ||
63 | __in const BURN_RELATED_BUNDLES* pRelatedBundles, | ||
64 | __in BOOL fReverse | ||
65 | ); | ||
62 | 66 | ||
63 | 67 | ||
64 | // function definitions | 68 | // function definitions |
@@ -1793,15 +1797,9 @@ static void LogPackages( | |||
1793 | else | 1797 | else |
1794 | { | 1798 | { |
1795 | // Display related bundles first if uninstalling. | 1799 | // Display related bundles first if uninstalling. |
1796 | if (BOOTSTRAPPER_ACTION_UNINSTALL == action && 0 < pRelatedBundles->cRelatedBundles) | 1800 | if (BOOTSTRAPPER_ACTION_UNINSTALL == action) |
1797 | { | 1801 | { |
1798 | for (int i = pRelatedBundles->cRelatedBundles - 1; 0 <= i; --i) | 1802 | LogRelatedBundles(pRelatedBundles, TRUE); |
1799 | { | ||
1800 | const BURN_RELATED_BUNDLE* pRelatedBundle = &pRelatedBundles->rgRelatedBundles[i]; | ||
1801 | const BURN_PACKAGE* pPackage = &pRelatedBundle->package; | ||
1802 | |||
1803 | LogId(REPORT_STANDARD, MSG_PLANNED_RELATED_BUNDLE, pPackage->sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingDependencyActionToString(pPackage->dependencyExecute)); | ||
1804 | } | ||
1805 | } | 1803 | } |
1806 | 1804 | ||
1807 | // Display all the packages in the log. | 1805 | // Display all the packages in the log. |
@@ -1852,13 +1850,28 @@ static void LogPackages( | |||
1852 | } | 1850 | } |
1853 | 1851 | ||
1854 | // Display related bundles last if caching, installing, modifying, or repairing. | 1852 | // Display related bundles last if caching, installing, modifying, or repairing. |
1855 | if (BOOTSTRAPPER_ACTION_UNINSTALL < action && 0 < pRelatedBundles->cRelatedBundles) | 1853 | if (BOOTSTRAPPER_ACTION_UNINSTALL < action) |
1856 | { | 1854 | { |
1857 | for (DWORD i = 0; i < pRelatedBundles->cRelatedBundles; ++i) | 1855 | LogRelatedBundles(pRelatedBundles, FALSE); |
1858 | { | 1856 | } |
1859 | const BURN_RELATED_BUNDLE* pRelatedBundle = &pRelatedBundles->rgRelatedBundles[i]; | 1857 | } |
1860 | const BURN_PACKAGE* pPackage = &pRelatedBundle->package; | 1858 | } |
1859 | |||
1860 | static void LogRelatedBundles( | ||
1861 | __in const BURN_RELATED_BUNDLES* pRelatedBundles, | ||
1862 | __in BOOL fReverse | ||
1863 | ) | ||
1864 | { | ||
1865 | if (0 < pRelatedBundles->cRelatedBundles) | ||
1866 | { | ||
1867 | for (DWORD i = 0; i < pRelatedBundles->cRelatedBundles; ++i) | ||
1868 | { | ||
1869 | const DWORD iRelatedBundle = fReverse ? pRelatedBundles->cRelatedBundles - 1 - i : i; | ||
1870 | const BURN_RELATED_BUNDLE* pRelatedBundle = pRelatedBundles->rgRelatedBundles + iRelatedBundle; | ||
1871 | const BURN_PACKAGE* pPackage = &pRelatedBundle->package; | ||
1861 | 1872 | ||
1873 | if (pRelatedBundle->fPlannable) | ||
1874 | { | ||
1862 | LogId(REPORT_STANDARD, MSG_PLANNED_RELATED_BUNDLE, pPackage->sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingDependencyActionToString(pPackage->dependencyExecute)); | 1875 | LogId(REPORT_STANDARD, MSG_PLANNED_RELATED_BUNDLE, pPackage->sczId, LoggingRelationTypeToString(pRelatedBundle->relationType), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingDependencyActionToString(pPackage->dependencyExecute)); |
1863 | } | 1876 | } |
1864 | } | 1877 | } |