Patch Families Can Only Ever Grow

Heath Stewart

Peter Marcu has begun talking about new functionality added into WiX 3.0 that he’s been working on a lot. One of the specific features is filtering by patch families. Based on a concept Office has used internally, patch families in this case are a set of resources that must be in a patch, and that patch can only be superseded by another patch with at least the same resources – a superset. Those then form the patch families that are authored into the MsiPatchSequence table in the patch package.

Peter notes,

One thing to note is that there are rules about patch families. Once you ship a patch family, you must keep its references the same or add to it (grow it) but never remove items from it. All items in your product must be a part of only one patch family. When you change the build that you are targeting (re-baseline), patch families start over so you can change the contents and [associations] at this time.

Definitions of patch families in WiX authoring can only ever grow; otherwise, regressions in versions of files or other resources can occur.

Consider patch Pa and newer patch Pb that sequences after Pa, both of which belong to only patch family F that contains components for both files foo.dll and bar.dll. Note also that the granularity of patch families should be nothing smaller than a component, since in most cases the components’ key path must be updated for the components to be updated.

Pa updates both foo.dll and bar.dll. The manufacturer later decides to define separate patch families to reduce the necessary size of subsequent patches. F now contains only foo.dll while F’ now contains bar.dll. Pb is shipped with only foo.dll and patch family F. If Pa was already installed, Pb would supersede Pa. Depending on the value of the REINSTALLMODE property, bar.dll will be regressed to its state before Pa was installed. Components with non-file resources will act accordingly; for example, registry values will be whatever they were before Pa was installed if not also included in Pb. Supersedence happens at the patch level, not the transform or resource level. Thus, the definition of patch families can never shrink or regression of resources is possible.


Discussion is closed.

Feedback usabilla icon