New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3421 - Reinstall packages that were uninstalled during failed upgrade bundle #50
3421 - Reinstall packages that were uninstalled during failed upgrade bundle #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed in meeting 217, the plan was to automatically trigger a normal install operation for the older bundle on rollback of an upgrade. Unfortunately, things aren't that black and white for Burn. I had to make Burn install all upgrade related bundles at the end of rollback regardless of which packages were executed for the following reasons:
@@ -1487,6 +1524,39 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
hr = DependencyPlanPackageComplete(&pRelatedBundle->package, pPlan); | |||
ExitOnFailure(hr, "Failed to complete plan dependency actions for related bundle package: %ls", pRelatedBundle->package.sczId); | |||
} | |||
|
|||
if (fInstallingAnyPackage && BOOTSTRAPPER_RELATION_UPGRADE == pRelatedBundle->relationType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There is no concept of "the older bundle", one bundle could have multiple bundles to uninstall as part of the Update related bundle behavior.
@@ -1487,6 +1524,39 @@ extern "C" HRESULT PlanRelatedBundlesComplete( | |||
hr = DependencyPlanPackageComplete(&pRelatedBundle->package, pPlan); | |||
ExitOnFailure(hr, "Failed to complete plan dependency actions for related bundle package: %ls", pRelatedBundle->package.sczId); | |||
} | |||
|
|||
if (fInstallingAnyPackage && BOOTSTRAPPER_RELATION_UPGRADE == pRelatedBundle->relationType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- As you can probably see from the first commit, I was planning on using the operation to only select MajorUpgrade bundles. But some bundles could support downgrading, so the bundle to install is actually newer and would have been labeled as Downgrade.
src/burn/engine/apply.cpp
Outdated
@@ -739,6 +744,9 @@ extern "C" HRESULT ApplyExecute( | |||
IgnoreRollbackError(hrRollback, "Failed rollback actions"); | |||
} | |||
|
|||
hrRollback = DoRestoreRelatedBundleActions(pEngineState, &context, pRestart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Identifying which upgrade bundle was responsible for each MSI that was uninstalled is not always possible. Another wrinkle here is that Exe packages could also be breaking things that the older bundles needs to repair.
0cef774
to
192c318
Compare
The Appveyor build was successful: https://ci.appveyor.com/project/wixtoolset/wix4/builds/42532091. |
When rolling back a bundle failure, reinstall all upgrade related bundles.
Fixes wixtoolset/issues#3421
wixtoolset/issues#5796