aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/plan.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-01-31 15:44:00 -0600
committerSean Hall <r.sean.hall@gmail.com>2022-02-01 23:36:23 -0600
commit56c980318e7167be591f7807c2fc34cea7d5cb42 (patch)
treee074b3548d8dfe51f420b6d0278a6fe17191b6ec /src/burn/engine/plan.cpp
parentbfe5ab76b5ecc1a21078534e6fba90d12cfd3c00 (diff)
downloadwix-56c980318e7167be591f7807c2fc34cea7d5cb42.tar.gz
wix-56c980318e7167be591f7807c2fc34cea7d5cb42.tar.bz2
wix-56c980318e7167be591f7807c2fc34cea7d5cb42.zip
The bundle provider's presence needs to follow ARP registration.
Diffstat (limited to 'src/burn/engine/plan.cpp')
-rw-r--r--src/burn/engine/plan.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp
index 2649ee39..a25b17d7 100644
--- a/src/burn/engine/plan.cpp
+++ b/src/burn/engine/plan.cpp
@@ -541,25 +541,14 @@ extern "C" HRESULT PlanRegistration(
541 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE; 541 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE;
542 } 542 }
543 543
544 // Always write registration since things may have changed or it just needs to be "fixed up".
545 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION;
546
547 // Always update our estimated size registration when installing/modify/repair since things
548 // may have been added or removed or it just needs to be "fixed up".
549 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_UPDATE_SIZE;
550
551 if (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) 544 if (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action)
552 { 545 {
553 // If our provider key was detected and it points to our current bundle then we can 546 // If our provider key was not owned by a different bundle,
554 // unregister the bundle dependency. 547 // then plan to write our provider key registration to "fix it" if broken
555 if (pRegistration->sczDetectedProviderKeyBundleId && 548 // in case the bundle isn't successfully uninstalled.
556 CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczId, -1, pRegistration->sczDetectedProviderKeyBundleId, -1)) 549 if (!pRegistration->fDetectedForeignProviderKeyBundleId)
557 { 550 {
558 pPlan->dependencyRegistrationAction = BURN_DEPENDENCY_REGISTRATION_ACTION_UNREGISTER; 551 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY;
559 }
560 else // log that another bundle already owned our registration, hopefully this only happens when a newer version
561 { // of a bundle installed and is in the process of upgrading us.
562 LogId(REPORT_STANDARD, MSG_PLAN_SKIPPED_PROVIDER_KEY_REMOVAL, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleId);
563 } 552 }
564 553
565 // Create the dictionary of dependents that should be ignored. 554 // Create the dictionary of dependents that should be ignored.
@@ -651,7 +640,7 @@ extern "C" HRESULT PlanRegistration(
651 640
652 // Always plan to write our provider key registration when installing/modify/repair to "fix it" 641 // Always plan to write our provider key registration when installing/modify/repair to "fix it"
653 // if broken. 642 // if broken.
654 pPlan->dependencyRegistrationAction = BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER; 643 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY;
655 644
656 // Create the dictionary of bundle dependents. 645 // Create the dictionary of bundle dependents.
657 hr = DictCreateStringList(&sdBundleDependents, 5, DICT_FLAG_CASEINSENSITIVE); 646 hr = DictCreateStringList(&sdBundleDependents, 5, DICT_FLAG_CASEINSENSITIVE);