Bug 82024

Summary: Need way to show partially installed packages
Product: Red Hat Enterprise Linux 2.1 Reporter: James Olin Oden <james.oden>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: tao
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-08 21:52:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Olin Oden 2003-01-16 14:40:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Tekelec)

Description of problem:
If an RPM fails in the %post script it will still show up in 
queries of the RPM database as being installed.  There is nothing
to show that though it was installed, it was not properly installed.
Under Solaris packages such as these are called partial packages
and one can detect there existance by simply typing:

   pkginfo -p

Which will list all the partial packages.  I believe (and know 
for my company) it would be very usefull to be able to do something
simular with systems managed by RPM.  

There is an incomplete workaround for this, in that one can check
for duplicate rpm names to find such partially installed packages.
The problem with this approach is it only works when one has upgraded
the package, and not if this is the initial install of a package.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
N/A

Additional info:

Comment 1 Jeff Johnson 2003-01-20 17:49:27 UTC
FWIW, the script I posted works even in the case of
a initial install, as that package is fully, not partially,
installed. Yes, payload unpacking may exit, but that is
detectable with --verify, and blocking signals during
payload unpacking is certainly an option.

OTOH, blocking signals leads to lack of responsiveness,
and causes those with short attention spans to start blasting
with "kill -9", creating a worse problem than before.

Comment 2 James Olin Oden 2003-01-20 19:29:28 UTC
Jeff,  I am not getting the results you say I should.

For example I create a partial package from the following spec:
   Summary:        Partial Package
   Name:           partial
   Version:        1.0
   Release:        1
   Group:          Broken/Tools
   Copyright:      No Importante
   Vendor:         Nadia
   BuildArchitectures:     noarch
   Provides:               %{name} = %{version}

   %description
   A partial package.

   %post
   exit 1

   %files

I build it with:

   rpmbuild -ba partial.spec

I install it (not upgrade) with:

   rpm -ivh partial-1.0-1.noarch.rpm

It installs but fails in the post sections (on purpose of course).
I run:

   rpm -V partial

This gives no output and returns 0.  Secondly if I do:

   rpm -qa --qf "%{NAME}\n" | grep partial

I get one instance shown of partial (which would make the 
sort uniq hack invalid).

Comment 3 Jeff Johnson 2003-01-20 19:37:49 UTC
If failing %post is your definition of "partial install",
then the answer is
   Fix your packaging
THere are bigger problems than busted %post that need to be solved.

Comment 4 James Olin Oden 2003-01-20 19:56:41 UTC
Look, I was doing this as a test case for a very real problem.  Just because
the kernel panic's does not mean that there is a bug in the kernel.  Sometimes
this is true, but often it may mean that something in the kernel's environment
(i.e. the hardware) has gone way south and the only right thing to do is panic.
In the same way, as one is doing error checking inside your post script, you 
may come across cases that the only right thing to do is exit with an error.
Furthmore, if you come accross a system that you are upgrading, and you can
see that the present instance of a package on the system is partially installed
you had better not simply upgrade anyway, but instead stop with a meaningful
error message that will give someone a clue.

Furthermore, the multiple instance method of checking for partial packages
does not allow for one to legitamitly have multiple instances of a particular
package (of the same name) installed.  There are more examples of this 
than just the kernel RPM's.

Lastly, though there may be bigger problems.  It is a problem.  No need to get
your feathers ruffled.  If RedHat cannot fix it anytime soon, well we will
have to cope, but it is a problem.  It would be real nice to see it in AS 3.0,
though.

Comment 5 Jeff Johnson 2003-01-20 20:05:07 UTC
In fact, the package with "exit 1" in %post is completely
installed with --install. Yes, any side effects from running
%post that occur after the exit are not performed.

Otherwise, the check I gave is adequate for detecting duplicately
named packages, which occur in practice only for the kernel.

This behavior is not going to change in the near future. not
because my feathres are ruffled, but because my marching orders
are different.



Comment 7 Paul Nasrat 2006-08-08 21:52:51 UTC
RHEL 2.1 is in maintenance mode, this will not be addressed in it.