aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/relatedbundle.cpp
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2026-02-17 19:41:03 -0500
committerBob Arnson <bob@firegiant.com>2026-02-17 19:48:12 -0500
commit5658492062bf28ffb670ede15cbd1413bf1182d8 (patch)
tree7e959881fdabed13359ff8cb78e68d9c74b81931 /src/burn/engine/relatedbundle.cpp
parentde80ff1102a1b34e430bbc718fe65a42bab196cf (diff)
downloadwix-bob/BundleLockUpgradeScope.tar.gz
wix-bob/BundleLockUpgradeScope.tar.bz2
wix-bob/BundleLockUpgradeScope.zip
Lock upgrade bundles to original bundle's scope.bob/BundleLockUpgradeScope
Fixes https://github.com/wixtoolset/issues/issues/9236
Diffstat (limited to '')
-rw-r--r--src/burn/engine/relatedbundle.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp
index d0b97af0..166c4ae8 100644
--- a/src/burn/engine/relatedbundle.cpp
+++ b/src/burn/engine/relatedbundle.cpp
@@ -325,6 +325,7 @@ static HRESULT LoadRelatedBundleFromKey(
325 BOOL fExists = FALSE; 325 BOOL fExists = FALSE;
326 BURN_DEPENDENCY_PROVIDER dependencyProvider = { }; 326 BURN_DEPENDENCY_PROVIDER dependencyProvider = { };
327 BURN_DEPENDENCY_PROVIDER* pBundleDependencyProvider = NULL; 327 BURN_DEPENDENCY_PROVIDER* pBundleDependencyProvider = NULL;
328 DWORD dwScope = 0;
328 329
329 // Only support progress from engines that are compatible. 330 // Only support progress from engines that are compatible.
330 hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_ENGINE_PROTOCOL_VERSION, &dwEngineProtocolVersion); 331 hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_ENGINE_PROTOCOL_VERSION, &dwEngineProtocolVersion);
@@ -355,6 +356,11 @@ static HRESULT LoadRelatedBundleFromKey(
355 LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleCode, sczBundleVersion); 356 LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleCode, sczBundleVersion);
356 } 357 }
357 358
359 hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_SCOPE, &dwScope);
360 ExitOnFailure(hr, "Failed to read registration %ls for bundle %ls.", wzRelatedBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_SCOPE);
361
362 pRelatedBundle->detectedScope = static_cast<BOOTSTRAPPER_SCOPE>(dwScope);
363
358 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); 364 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath);
359 ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleCode); 365 ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleCode);
360 366
@@ -390,6 +396,12 @@ static HRESULT LoadRelatedBundleFromKey(
390 396
391 pRelatedBundle->detectRelationType = relationType; 397 pRelatedBundle->detectRelationType = relationType;
392 398
399 hr = StrAllocString(&pRelatedBundle->package.Bundle.sczBundleCode, wzRelatedBundleCode, 0);
400 ExitOnFailure(hr, "Failed to bundle code to related bundle.");
401
402 hr = RegReadStringArray(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE, &pRelatedBundle->package.Bundle.rgsczUpgradeCodes, &pRelatedBundle->package.Bundle.cUpgradeCodes);
403 ExitOnFailure(hr, "Failed to read upgrade codes.");
404
393 hr = PseudoBundleInitializeRelated(&pRelatedBundle->package, fSupportsBurnProtocol, fPerMachine, wzRelatedBundleCode, 405 hr = PseudoBundleInitializeRelated(&pRelatedBundle->package, fSupportsBurnProtocol, fPerMachine, wzRelatedBundleCode,
394#ifdef DEBUG 406#ifdef DEBUG
395 pRelatedBundle->detectRelationType, 407 pRelatedBundle->detectRelationType,