[wix-users] RelatedBundle Action for Patch

Sean Hall r.sean.hall at gmail.com
Fri Feb 25 12:33:54 PST 2022


That last if condition is false because the package is Present. There have
been very minimal changes to Burn in v3.14 vs v3.11.2 so I wouldn't expect
the behavior to be different.

Microsoft drove the development of patch related bundles but no one ever
documented the behavior so I can only guess what's happening. They appear
to have added an optimization for speed where the patch bundle doesn't
bother uninstalling its patches if it's uninstalling itself from being
launched by its base bundle. But if the patch bundle doesn't try to
uninstall the patch, then it won't try to uncache it either. So either
there's a bug here (whether they ported it wrong from their internal repo
or it was also broken in their repo) or they had a special way to get the
base bundle to uncache the patch bundle's packages.

Please file a bug with a log file and information about how to reproduce
this scenario. Ideally the repro would be adding a failing test to
https://github.com/wixtoolset/wix4/tree/develop/src/test/burn/WixToolsetTest.BurnE2E
.

On Fri, Feb 25, 2022 at 12:30 PM Nick Elmer via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Thanks for the reply Rob! One further question.
>
> During the uninstall of the release bundle from ARP is successful. The
> patch bundle is also uninstalled successfully. However, I am seeing the
> MSP's left behind in the package cache. The relative section from the patch
> bundle uninstall logs are below. As you can see from the logs, the plan
> does not schedule the uncache of the dependent packages, but it does for
> the bundle. I looked at the source for
> src\burn\engine\plan.cpp::PlanCleanPackage() and the last if condition
> seems like it should be triggering removal of the dependent packages. I am
> using 3.14.0 of Wix but looking at source 3.11.2 source, so that logic may
> have changed. Is this possibly a bug in 3.14 or am I missing something?
>
> Plan begin, 2 packages, action: Uninstall
> Plan skipped related bundle: { GUID_F }, type: Dependent, because it was
> previously scheduled.
> OnPlanPackageBegin PackageId: PatchA, State:None. Result:None
> OnPlanPackageComplete: Status:0.
> OnPlanPackageBegin PackageId:PatchB, State:None. Result:None
> OnPlanPackageComplete: Status:0.
> Planned related bundle: {OUR_BUNDLE_GUID}, type: Dependent, default
> requested: None, ba requested: None, execute: None, rollback: None,
> dependency: None
> Planned package: PatchA, state: Present, default requested: None, ba
> requested: None, execute: None, rollback: None, cache: No, uncache: No,
> dependency: Unregister
> Planned package: PatchB, state: Present, default requested: None, ba
> requested: None, execute: None, rollback: None, cache: No, uncache: No,
> dependency: Unregister
> Plan complete, result: 0x0
> ...
> OnRegisterBegin: Result:None.
> Updating session, registration key:
> SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID_E}, resume:
> Active, restart initiated: No, disable resume: Yes
> OnRegisterComplete: Status:0.
> OnExecuteBegin: Result:None.
> Removed dependency: { GUID_E } on package provider: { GUID_D }, package
> PatchA
> package dependency provider: { GUID_D }, package: PatchA
> Removed dependency: { GUID_E } on package provider: { GUID_2 }, package
> PatchB
> Removed package dependency provider: { GUID_2 }, package: PatchB
> OnExecuteComplete: Status:0.
> OnUnregisterBegin.
> Session end, registration key:
> SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ GUID_E }, resume:
> None, restart: None, disable resume: Yes
> Removed bundle dependency provider: { GUID_E }
> Removing cached bundle: { GUID_E }, from path: C:\ProgramData\Package
> Cache\{ GUID_E }\
> Updating session, registration key:
> SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ GUID_E }, resume:
> None, restart initiated: No, disable resume: Yes
> OnUnregisterComplete.
>
> -----Original Message-----
> From: Rob Mensching <rob at firegiant.com>
> Sent: Wednesday, February 23, 2022 11:58 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Cc: Nick Elmer <nelmer at awarenesstech.com>
> Subject: RE: RelatedBundle Action for Patch
>
> This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with
> links and attachments.
>
> Patch bundles do not replace the original bundle. They are "appended" to
> it. To replace the original bundle, you upgrade it.
>
> -----Original Message-----
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of
> Nick Elmer via wix-users
> Sent: Wednesday, February 23, 2022 8:07 AM
> To: wix-users at lists.wixtoolset.org
> Cc: Nick Elmer <nelmer at awarenesstech.com>
> Subject: [wix-users] RelatedBundle Action for Patch
>
> Hi All,
> I am trying to deliver a patch bundle to update an install of a release
> build. I'm trying to understand the difference between the RelatedBundle
> actions. Specifically "Patch" and "Upgrade". I found this thread <
> http://lists.wixtoolset.org/pipermail/wix-users-wixtoolset.org/2018-June/007073.html>
> where Jacob discusses the upgrade action, but it doesn't give me the whole
> picture with respect to patching. Nick's "WiX 3.6 - A Developer's Guide to
> Windows Installer XML" also documents upgrades, but nothing regarding patch
> bundles.
>
> As described below, I need the patch bundle to have the behavior he
> describes where the new bundle UI with bug fixes takes priority over the
> old bundle after a patch install. However that does not seem to happen when
> "Patch" is defined. When running the patch bundle I see the MSP's get
> applied as patches, however the ARP uninstall will run the Gold bundle from
> the cache and not the Patch bundle after install. Seems like "Upgrade" is
> for major upgrades, and "Patch" is for applying patches.  What am I missing?
>
> Here is what I have:
> Bundle (Gold)
> -Custom UI
> -RelatedBundleRTM=Detect
> -- ProductA.msi
> -- ProductB.msi
>
> Bundle (Patch)
> -Custom UI
> -RelatedBundleRTM=Patch
> -RelatedBundlePatchA=Detect
> -- ProductA.msp
> -- ProductB.msp
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list