Subject: Re: adding upgrade to pkg_add
To: Jeremy C. Reed <>
From: Greg A. Woods <>
List: tech-pkg
Date: 04/11/2003 18:16:03
[ On Friday, April 11, 2003 at 11:22:29 (-0700), Jeremy C. Reed wrote: ]
> Subject: Re: adding upgrade to pkg_add
> On Thu, 10 Apr 2003, Greg A. Woods wrote:
> > 
> > You should only ever be upgrading critical packages while the system is
> > in single user mode!  That should go without saying.
> Nevertheless, I have updated libc and other essential sh utilities well
> over a hundred times on several different BSD and Linux systems while the
> systems are actively being used.

I'm really glad I'm not one of your users.  While the ability to do such
a thing might be useful for developers it has absolutely no place in any
production environment.

That's part of why there's a difference between an OS upgrade and a
the upgrade of some non-essential add-on package.  :-)

I would strongly suggest that you take a look at how this is done in
UNIX System V Release 4, i.e. in SunOS-5.x, which is essentially the
canonical example of a full and complete software packaging system for
UNIX and unix-like systems and which in many ways is what pkg_install
was apparently conceptually based upon.

In particular I would suggest looking at installf(1M) and removef(1M) to
see how they can be used to manage "patches" to already installed
"system" packages (e.g. those containing objects used by pgk_* and a
normally running system).

> Also, I skip the PRE-INSTALL and POST-INSTALL for the (overwrite) upgrade.
> Now, I think that it is okay if it does do the PRE-INSTALL and
> POST-INSTALL -- even if package is already installed. Any comments? And
> examples where it might be a problem?

It _may_ make sense to skip the PRE-INSTALL and POST-INSTALL steps,
however there could well still be issues since the scope of those steps
is not extremely well defined.

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>