Open rseanhall opened 3 years ago
Applying package: PatchA, target: {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}, action: Repair, path: {9492803B-A53B-48EE-9779-3EDC228BA327}, arguments: ' BURNMSIREPAIR=1'
There are multiple Burn integration tests that need to be updated with this.
The package is superseded because the manifest records the unpatched product version but during Detect, MSI helpfully provides the patched product version. Superseded packages aren't repaired because doing so (for an unpatched product) would undo the effects of a patch bundle shipping a minor upgrade package (e.g.). Burn does repair the patch package but that only "repairs" the components in the patch.
(This problem occurs whenever a bundle includes patches that target a product also in the bundle, not just when the patches are slipstreamed.)
To fix this issue -- i.e., to get Burn to detect the installed product as equivalent to the product and patches in the bundle -- would require Burn to sequence the patches, enumerate those applied to the product, and then interpret the (possibly many) sequenced patch XML blobs to determine the patched product version. The schema is documented so this is a legitmate approach to take. It doesn't look too hard because MSI does the heavy part of sequencing but trusting that we have coverage of all of the oh-so-many ways patches can be constructed gives me the heebie-jeebies (technical term).
My gas-powered sledgehammer idea is to mark the package present if it has any of the bundle's patch packages applied. A repair on the product would let MSI handle bringing all the applied packages into view for the repair. But I can imagine this going all kinds of wrong.
Bugs
If this issue is a bug:
Burn log
``` i001: Burn x86 v4.0.0.77, Windows v10.0 x64 (Build 19041: Service Pack 0), path: C:\Windows\Temp\{BEA9FDCC-C2D2-467B-8FE4-2F3F771C9E06}\.cr\BundleA.exe i000: Initializing string variable 'TestGroupName' to value 'SlipstreamTests' i009: Command Line: '-burn.clean.room=C:\burn\slipstream4\TestData\SlipstreamTests\BundleA.exe -burn.filehandle.attached=532 -burn.filehandle.self=544 -quiet -log C:\Users\admin\AppData\Local\Temp\SlipstreamTests_CanInstallBundleWithSlipstreamedPatchThenRepairIt_20210210110137_Repair_BundleA.log -repair' i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\burn\slipstream4\TestData\SlipstreamTests\BundleA.exe' i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\burn\slipstream4\TestData\SlipstreamTests\' i000: Setting string variable 'WixBundleLog' to value 'C:\Users\admin\AppData\Local\Temp\SlipstreamTests_CanInstallBundleWithSlipstreamedPatchThenRepairIt_20210210110137_Repair_BundleA.log' i000: Unsetting variable 'WixBundleManufacturer' i000: Loading managed bootstrapper application. i000: Creating BA thread to run asynchronously. i100: Detect begin, 3 packages i000: Setting string variable 'NETFRAMEWORK45' to value '528372' i102: Detected related bundle: {CBCD880D-6B86-48FA-A39F-18004C146D27}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: MajorUpgrade i106: Calculating patch applicability for target product code: {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}, context: Machine i052: Condition 'NETFRAMEWORK45 >= 528040' evaluates to true. i103: Detected related package: {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}, scope: PerMachine, version: 1.0.1.0, language: 1033 operation: Downgrade i101: Detected package: NetFx48Web, state: Present, cached: None, install registration state: (permanent), cache registration state: (permanent) i101: Detected package: PackageA, state: Superseded, cached: Complete, install registration state: Present, cache registration state: Present i101: Detected package: PatchA, state: Present, cached: Complete, install registration state: Present, cache registration state: Present i105: Detected package: PatchA target: {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}, state: Present i199: Detect complete, result: 0x0, installed: Yes, eligible for cleanup: No i200: Plan begin, 3 packages, action: Repair w321: Skipping dependency registration on package with no dependency providers: NetFx48Web i000: Setting string variable 'NetFx48WebLog' to value 'C:\Users\admin\AppData\Local\Temp\SlipstreamTests_CanInstallBundleWithSlipstreamedPatchThenRepairIt_20210210110137_Repair_BundleA_000_NetFx48Web.log' i000: Setting string variable 'WixBundleLog_PatchA' to value 'C:\Users\admin\AppData\Local\Temp\SlipstreamTests_CanInstallBundleWithSlipstreamedPatchThenRepairIt_20210210110137_Repair_BundleA_{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}_001_PatchA.log' i201: Planned package: NetFx48Web, state: Present, default requested: Repair, ba requested: Repair, execute: Repair, rollback: None, cache: Yes, uncache: No, dependency: None, expected install registration state: (permanent), expected cache registration state: (permanent) i201: Planned package: PackageA, state: Superseded, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: Register, expected install registration state: Present, expected cache registration state: Present i201: Planned package: PatchA, state: Present, default requested: Repair, ba requested: Repair, execute: Repair, rollback: None, cache: No, uncache: No, dependency: Register, expected install registration state: Present, expected cache registration state: Present i207: Planned related bundle: {CBCD880D-6B86-48FA-A39F-18004C146D27}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None i000: --- Begin plan dump --- i000: Plan action: Repair i000: per-machine: true i000: disable-rollback: false i000: estimated size: 3055111 i000: Plan cache size: 1499880 i000: Cache action[0]: CHECKPOINT id: 1 i000: Cache action[1]: PACKAGE_START id: NetFx48Web, plan index for skip: 4, payloads to cache: 1, bytes to cache: 1479400, skip until retried: No i000: Cache action[2]: ACQUIRE_PAYLOAD package id: NetFx48Web, payload id: NetFx48Web, source path: redist\ndp48-web.exe, working path: C:\Windows\Temp\{5E45CAAE-2AC1-40F0-98A7-AA56122D0250}\NetFx48Web, skip until retried: No i000: Cache action[3]: CACHE_PAYLOAD package id: NetFx48Web, payload id: NetFx48Web, working path: C:\Windows\Temp\{5E45CAAE-2AC1-40F0-98A7-AA56122D0250}\NetFx48Web, operation: move, skip until retried: No, retry action: 2 i000: Cache action[4]: PACKAGE_STOP id: NetFx48Web, skip until retried: No i000: Cache action[5]: SIGNAL_SYNCPOINT event handle: 0x000005AC, skip until retried: No i000: Cache action[6]: CHECKPOINT id: 5 i000: Cache action[7]: PACKAGE_START id: PatchA, plan index for skip: 10, payloads to cache: 1, bytes to cache: 20480, skip until retried: No i000: Cache action[8]: EXTRACT_CONTAINER id: WixAttachedContainer, working path: C:\Windows\Temp\{BEA9FDCC-C2D2-467B-8FE4-2F3F771C9E06}\.cr\BundleA.exe, skip until retried: Yes, skip until acquired by action: 2147483648 i000: extract package id: PatchA, payload id: PatchA, working path: C:\Windows\Temp\{5E45CAAE-2AC1-40F0-98A7-AA56122D0250}\PatchA i000: Cache action[9]: CACHE_PAYLOAD package id: PatchA, payload id: PatchA, working path: C:\Windows\Temp\{5E45CAAE-2AC1-40F0-98A7-AA56122D0250}\PatchA, operation: move, skip until retried: No, retry action: 8 i000: Cache action[10]: PACKAGE_STOP id: PatchA, skip until retried: No i000: Cache action[11]: SIGNAL_SYNCPOINT event handle: 0x000005B4, skip until retried: No i000: Plan execute package count: 3 i000: overall progress ticks: 5 i000: Execute action[0]: ROLLBACK_BOUNDARY id: WixDefaultBoundary, vital: yes i000: Execute action[1]: WAIT_SYNCPOINT event handle: 0x000005AC i000: Execute action[2]: CHECKPOINT id: 2, msi transaction id: (none) i000: Execute action[3]: EXE_PACKAGE package id: NetFx48Web, action: Repair, ignore dependencies: (null) i000: Execute action[4]: CHECKPOINT id: 3, msi transaction id: (none) i000: Execute action[5]: WAIT_SYNCPOINT event handle: 0x000005AC i000: Execute action[6]: PACKAGE_PROVIDER package id: PackageA, action: Register i000: Execute action[7]: PACKAGE_DEPENDENCY package id: PackageA, bundle provider key: {659CD8A9-57BE-4795-8F63-F359A648ED5D}, action: Register i000: Execute action[8]: CHECKPOINT id: 4, msi transaction id: (none) i000: Execute action[9]: WAIT_SYNCPOINT event handle: 0x000005B4 i000: Execute action[10]: PACKAGE_PROVIDER package id: PatchA, action: Register i000: Execute action[11]: MSP_TARGET package id: PatchA, action: Repair, target product code: {5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}, target per-machine: yes, action msi property: BURNMSIREPAIR, ui level: 2, disable externaluihandler: no, log path: C:\Users\admin\AppData\Local\Temp\SlipstreamTests_CanInstallBundleWithSlipstreamedPatchThenRepairIt_20210210110137_Repair_BundleA_{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}_001_PatchA.log i000: Patch[0]: order: 0, msp package id: PatchA i000: Execute action[12]: PACKAGE_DEPENDENCY package id: PatchA, bundle provider key: {659CD8A9-57BE-4795-8F63-F359A648ED5D}, action: Register i000: Execute action[13]: CHECKPOINT id: 6, msi transaction id: (none) i000: Execute action[14]: CHECKPOINT id: 7, msi transaction id: (none) i000: Execute action[15]: WAIT_SYNCPOINT event handle: 0x000005B4 i000: Execute action[16]: EXE_PACKAGE package id: {CBCD880D-6B86-48FA-A39F-18004C146D27}, action: Uninstall, ignore dependencies: (null) i000: Rollback action[0]: ROLLBACK_BOUNDARY id: WixDefaultBoundary, vital: yes i000: Rollback action[1]: UNCACHE_PACKAGE id: NetFx48Web i000: Rollback action[2]: CHECKPOINT id: 2, msi transaction id: (none) i000: Rollback action[3]: CHECKPOINT id: 3, msi transaction id: (none) i000: Rollback action[4]: CHECKPOINT id: 4, msi transaction id: (none) i000: Rollback action[5]: CHECKPOINT id: 6, msi transaction id: (none) i000: Rollback action[6]: CHECKPOINT id: 7, msi transaction id: (none) i000: Rollback action[7]: EXE_PACKAGE package id: {CBCD880D-6B86-48FA-A39F-18004C146D27}, action: Install, ignore dependencies: (null) i000: --- End plan dump --- i299: Plan complete, result: 0x0 ```