[Redirected to install-discuss; please follow-up there.]

Chung Hang Christopher Chan writes:
> > Right now, a patch is usually one or more partial
> > packages that
> > overwrite the existing files (binaries, more often
> > than not), plus
> > optionally scripts to do "smart" stuff (merge
> > configuration changes,
> > for example).  In that sense, they're not entirely
> > separate.
> 
> Well, will the pkg tools be able to update existing
> binaries and handle whatever else that is needed from
> whole new updated srv4 packages? Scrap patches.

Yes, they can do that.

Patches and packages are related in some fairly complicated ways, and
most non-Sun software does exactly as you suggest -- simply providing
a new package for each change.

A patch is a collection of "sparse packages."  These are actually in
regular SVr4 package format, but do *not* contain all of the files in
the original package -- just the changed files.

Some key attributes of patches are:

  - They're atomic changes.  This allows us to change multiple
    binaries across the system in one coordinated mechanism.

  - They don't change package version numbers.  Each package can have
    a disjoint set of patches applied for different changes.

  - They allow backout of changes.

For the "atomic" part, consider what happens when you have libfoo.so.1
delivered by PKGfoo and /usr/bin/myapp (linked to libfoo) delivered by
PKGmyapp.  If you try to upgrade by way of packages, and if there are
incompatible changes in the libfoo interface, then upgrading either
package alone results in a broken system.  This is the sort of problem
that patching aims to fix -- making sure that the user always gets a
coordinated set of changes.

Yes, it's entirely possible to do the same thing by computing package
dependencies, and then interlocking the package upgrade mechanism so
that you always step from one set to another.  The potential problem
that presents (and the reason why patches are valued by commercial
customers) is that you often end up forcing users to take features
they don't want in order to get patches that they need.

In truth, of course, there are issues with patches (the well-known
aggregation problem) that cause the same effect over time with long
patch trains and feature backporting, so perhaps it's a wash.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to