Skip to content
/ wix Public

Commit 60dafdd

Browse files
nirbarrobmen
authored andcommitted
ForceAbsent can now remove a package even if it still has dependents
Resolves 8962
1 parent 9a26c32 commit 60dafdd

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/burn/engine/dependency.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ extern "C" HRESULT DependencyPlanPackageBegin(
419419
STRINGDICT_HANDLE sdIgnoredDependents = NULL;
420420
BURN_DEPENDENCY_ACTION dependencyExecuteAction = BURN_DEPENDENCY_ACTION_NONE;
421421
BURN_DEPENDENCY_ACTION dependencyRollbackAction = BURN_DEPENDENCY_ACTION_NONE;
422+
BOOL fDependenciesForcedAbsent = FALSE;
422423
BOOL fDependentBlocksUninstall = FALSE;
423424
BOOL fAttemptingUninstall = BOOTSTRAPPER_ACTION_STATE_UNINSTALL == pPackage->execute || pPackage->compatiblePackage.fRemove;
424425

@@ -467,7 +468,16 @@ extern "C" HRESULT DependencyPlanPackageBegin(
467468
{
468469
hr = S_OK;
469470

470-
if (!fDependentBlocksUninstall)
471+
if (BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT == pPackage->requested)
472+
{
473+
if (!fDependenciesForcedAbsent)
474+
{
475+
fDependenciesForcedAbsent = TRUE;
476+
477+
LogId(REPORT_STANDARD, MSG_DEPENDENCY_PACKAGE_DEPENDENTS_OVERRIDDEN, pPackage->sczId);
478+
}
479+
}
480+
else if (!fDependentBlocksUninstall)
471481
{
472482
fDependentBlocksUninstall = TRUE;
473483

src/burn/engine/engine.mc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,3 +1282,9 @@ Language=English
12821282
Skipping MSI property '%1!ls!' because condition '%2!ls!' evaluates to %3!hs!.
12831283
.
12841284
1285+
MessageId=701
1286+
Severity=Warning
1287+
SymbolicName=MSG_DEPENDENCY_PACKAGE_DEPENDENTS_OVERRIDDEN
1288+
Language=English
1289+
BA requested to uninstall package: %1!ls!, despite dependents:
1290+
.

0 commit comments

Comments
 (0)