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

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



On Wed, Jan 15, 2003 at 03:30:27PM -0500, James Olin Oden wrote:
> > 
> > On Wed, Jan 15, 2003 at 03:10:11PM -0500, James Olin Oden wrote:
> > > My question is concerning packages that fail in the %post
> > > scriptlet.  In Solaris these sort of packages were called partial
> > > packages as their file payload was installed, but the post installation
> > > script failed.
> > > 
> > > The question is how do you detect such an RPM on the system?
> > 
> > Install the package. If it fails in %post, then clean up
> > the mess.
> >
> Yeah I figured that.  Here is the scenario that this does not handle.
> 
> 	- A packages has been partially installed at some point in time,
> 	and was not cleaned up.
> 	- At a later point we decide to do an upgrade (using RPM directly
> 	not through anaconda so we can use the transactional rollback features).
> 	
> 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.

Try
    rpm -qa --qf '%{name}\n' | sort | uniq -d | grep -v kernel
That's most, if not all, of the partial installs. Prune to taste.

> Should I bugzilla this as a feature request?
> 

Popt alias left for extra credit.

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] []