aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/engine/core.cpp')
-rw-r--r--src/burn/engine/core.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp
index 8fac7bd0..9d5364a4 100644
--- a/src/burn/engine/core.cpp
+++ b/src/burn/engine/core.cpp
@@ -488,7 +488,7 @@ extern "C" HRESULT CorePlan(
488 pEngineState->plan.pPayloads = &pEngineState->payloads; 488 pEngineState->plan.pPayloads = &pEngineState->payloads;
489 pEngineState->plan.wzBundleId = pEngineState->registration.sczId; 489 pEngineState->plan.wzBundleId = pEngineState->registration.sczId;
490 pEngineState->plan.wzBundleProviderKey = pEngineState->registration.sczId; 490 pEngineState->plan.wzBundleProviderKey = pEngineState->registration.sczId;
491 pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback; 491 pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action;
492 pEngineState->plan.fBundleAlreadyRegistered = pEngineState->registration.fInstalled; 492 pEngineState->plan.fBundleAlreadyRegistered = pEngineState->registration.fInstalled;
493 493
494 hr = PlanSetVariables(action, &pEngineState->variables); 494 hr = PlanSetVariables(action, &pEngineState->variables);
@@ -756,6 +756,14 @@ extern "C" HRESULT CoreApply(
756 } 756 }
757 } 757 }
758 758
759 if (BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action)
760 {
761 fSuspend = FALSE;
762 restart = BOOTSTRAPPER_APPLY_RESTART_NONE;
763
764 LogId(REPORT_STANDARD, MSG_UNSAFE_APPLY_COMPLETED);
765 }
766
759 if (fSuspend || BOOTSTRAPPER_APPLY_RESTART_INITIATED == restart) 767 if (fSuspend || BOOTSTRAPPER_APPLY_RESTART_INITIATED == restart)
760 { 768 {
761 // Leave cache alone. 769 // Leave cache alone.
@@ -773,7 +781,7 @@ extern "C" HRESULT CoreApply(
773 } 781 }
774 782
775LExit: 783LExit:
776 if (fRollbackCache) 784 if (fRollbackCache && !pEngineState->plan.fDisableRollback)
777 { 785 {
778 ApplyCacheRollback(&pEngineState->userExperience, &pEngineState->plan, pEngineState->companionConnection.hCachePipe, &applyContext); 786 ApplyCacheRollback(&pEngineState->userExperience, &pEngineState->plan, pEngineState->companionConnection.hCachePipe, &applyContext);
779 } 787 }
@@ -978,6 +986,9 @@ static HRESULT CoreRecreateCommandLine(
978 case BOOTSTRAPPER_ACTION_UNINSTALL: 986 case BOOTSTRAPPER_ACTION_UNINSTALL:
979 hr = StrAllocConcat(psczCommandLine, L" /uninstall", 0); 987 hr = StrAllocConcat(psczCommandLine, L" /uninstall", 0);
980 break; 988 break;
989 case BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL:
990 hr = StrAllocConcat(psczCommandLine, L" /unsafeuninstall", 0);
991 break;
981 } 992 }
982 ExitOnFailure(hr, "Failed to append action state to command-line"); 993 ExitOnFailure(hr, "Failed to append action state to command-line");
983 994
@@ -1414,6 +1425,13 @@ extern "C" HRESULT CoreParseCommandLine(
1414 ExitOnFailure(hr, "Failed to copy path for layout directory."); 1425 ExitOnFailure(hr, "Failed to copy path for layout directory.");
1415 } 1426 }
1416 } 1427 }
1428 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"unsafeuninstall", -1))
1429 {
1430 if (BOOTSTRAPPER_ACTION_HELP != pCommand->action)
1431 {
1432 pCommand->action = BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL;
1433 }
1434 }
1417 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"uninstall", -1)) 1435 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"uninstall", -1))
1418 { 1436 {
1419 if (BOOTSTRAPPER_ACTION_HELP != pCommand->action) 1437 if (BOOTSTRAPPER_ACTION_HELP != pCommand->action)
@@ -2207,7 +2225,7 @@ static void LogPackages(
2207 __in const BOOTSTRAPPER_ACTION action 2225 __in const BOOTSTRAPPER_ACTION action
2208 ) 2226 )
2209{ 2227{
2210 BOOL fUninstalling = BOOTSTRAPPER_ACTION_UNINSTALL == action; 2228 BOOL fUninstalling = BOOTSTRAPPER_ACTION_UNINSTALL == action || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == action;
2211 2229
2212 if (pUpgradeBundlePackage) 2230 if (pUpgradeBundlePackage)
2213 { 2231 {
@@ -2286,8 +2304,8 @@ static void LogPackages(
2286 } 2304 }
2287 } 2305 }
2288 2306
2289 // Display related bundles last if caching, installing, modifying, or repairing. 2307 // Display related bundles last if not uninstalling.
2290 if (BOOTSTRAPPER_ACTION_UNINSTALL < action) 2308 if (!fUninstalling)
2291 { 2309 {
2292 LogRelatedBundles(pRelatedBundles, FALSE); 2310 LogRelatedBundles(pRelatedBundles, FALSE);
2293 } 2311 }