[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: RPM's that fail in %post...



On Thu, Jan 16, 2003 at 01:36:06PM -0500, James Olin Oden wrote:
> > 
> > On Wed, Jan 15, 2003 at 03:30:27PM -0500, James Olin Oden wrote:
> > > > 
> > > In this upgrade we would prefer to check for the existence of these partial 
> > > packages, and abort the upgrade if they exist.
> > > 
> > > On Solaris one can type:
> > > 
> > > 	pkginfo -p
> > > 
> > > and it will list such partially installed packages.  I believe the same
> > > thing could be done with RPM fairly easily, but maybe not.  Essentially,
> > > all one would need to do is have some sort of a boolean in the information
> > > for an RPM that denoted whethor it was a partial package or not, and then
> > > extend the rpm query commandline to request the partial packages.
> > > 
> > 
> > Nah, booleans rot too.
> >
> So, say I was to try to patch RPM 4.04 to have some method of reliably reporting
> partially installed packages on the system.  What would be an algorithm that
> you would find acceptable?

For partially installed packages terminated by broken %post? That's a global
design flaw in rpm, there's lots more than a boolean that's gonna be needed
to solve correctly.

(aside) Getting a signal handler in place and running with signals blocked is
the very 1st step to solving the problem. Already "stale locks" left mostly
be people blasting with "kill -9" is a problem. Can't be helped, nptl will
get a refcount on the locks to support the trigger happy blasters, but there's
lots more to do.

I'd suggest focusing on --rollback instead, trying to detect a "partial install"
reliably in that context. FWIW I'd find most any --rollback patch acceptable.
Better policy, not mechanism, particularly if shaped by real world experience,
is gonna be needed for a robust implementation of --rollback.

One of the very 1st problems that needs solving in rpm-4.0.4 is how to avoid
repackaging an already rolled back package. That is fixed in latest up2date
policy by looking for a REMOVETID tag, which only a currently installed (by
--rollback) package will ever contain. The current up2date implementation
does not include that package in Yet Another rollback/repackage transaction
operation.

That policy can be coded in  about 10-20 lines in IDTXload(), and that's
exactly the same place that "partial installs" might be detected/corrected.

HTH

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []